Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR200 Ouput String via serial


vegtecnologia Jun 20, 2013 04:18 PM

Hello everybody.

I already create successfully connection betwen the CR200 and a GSM terminal.

I used the function Print, and everything was ok.

My next challenge is make one GPS terminal(SAT-202) read the strings outputed by the CR200 and execute the commands.

I was trying Print(2, 9600, "CB04");

CB04 change the oceanic zone, but this command seemss not work.

The baud rate, parity, data bits and everything seems.

How the CR200 operate with Strings?How can i print the "ENTER" after the string?(<CR><LF>


aps Jun 20, 2013 05:17 PM

With the more recent operating systems you should be able to use this syntax:

"The PrintParams argument is the list of variable names, quoted strings, or non-ASCII characters to print. Non-ASCII characters should be listed with the CHR$(ascii code) syntax. Separate list items with a comma. To print a percent sign, precede it with a % (e.g., %%)."

So CR, LF would be CHR$(13), CHR$(10)

Support for strings in the CR200 is otherwise pretty limited, although the CR200X does has some limited capability to read in serial data.

* Last updated by: aps on 6/20/2013 @ 11:22 AM *


vegtecnologia Jun 20, 2013 05:22 PM

Thanks for the reply.


The right way to do this is Print(2,9600,"CB04" . CHR$(13) . CHR$(1));

?

How CR Basic work with Concatenation? using dot's?


aps Jun 20, 2013 05:35 PM

No you use commas. Also note the extra comment from the help system though:

Notes: Non-ASCII characters print with a space before and after the character. If a space is not desired, enter a negative Port parameter (e.g., for communication over the RF port and no spaces, enter -1 for Port).


vegtecnologia Jun 20, 2013 05:48 PM

If i want to send

"MM L variable1_variable2"

I would use

Print(2,9600, "MM L",variable1,"_",variable2,CHR$(13)).

For example.


vegtecnologia Jun 20, 2013 07:14 PM

My commands still not showing in SAT, there is another way to test them?Or send data throw serial?


aps Jun 20, 2013 09:22 PM

To get exactly what you want, you need a space after the L and you also need to make the port parameter negative to supress extra spaces. This should work:

Print(-2,9600,"MM L ",variable1,"_",variable2,CHR$(13))

If you load the program then switch to using a terminal emulator program with the logger connected to the PC set to run at 9600 baud you should be able to see the data coming out of the logger, so you can check the format.

Log in or register to post/reply in the forum.