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>
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 *
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?
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).
If i want to send
"MM L variable1_variable2"
I would use
Print(2,9600, "MM L",variable1,"_",variable2,CHR$(13)).
For example.
My commands still not showing in SAT, there is another way to test them?Or send data throw serial?
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.