SEND_STRING - Default CR?
screenscribe
Posts: 33
Does SEND_STRING send a CR at the end of a command that you send to a device, by chance? I currently have all of my commands with the CR specified which I then pass to the device via SEND_STRING. Just want to make sure it's not assumed that the command will do this.
Cheers,
Matthew
Cheers,
Matthew
0
Comments
no, you must send it manually yourself.
it looks like
SEND_STRING dv_My_Serial_port , " 'a command string',$0D,$0A" // $D for <CR> and $A or <LF>
I'm guessing that the device in question does not need a CR terminator in this case and they're just using it to the delimit commands in the queue?
Cheers,
Matthew
Hmmm... it's hard to say without the rest of the code.
I assume that somewhere in the code the variable/constant CR is set to $0D
On the other end you would have something like this:
The $0D would act as a delimiter for the module to parse what you sent it which is what it looks like you're seeing in the code you posted. My above code is just a crude example.
--John
Thanks for the help, guys. I know I've had a ton of questions over the last week...just trying to make sure I don't get bitten by any peculiarities.
Cheers,
Matthew
Cheers,
Matthew