Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

COM port appending NUL to string...

For general discussion related FlowStone

COM port appending NUL to string...

Postby fixstuff555 » Sat Apr 30, 2011 4:26 am

I have a question about the COM port primitive. Is it supposed to append a NUL character after whatever string is sent? If its supposed to do that, how can I turn it off. I am playing with a simple RPC call to an MBED chip, but I'm getting a NUL appended to the string, and it will eventually fault out the MBED after too many of those.
Attachments
comport.fsm
(9.1 KiB) Downloaded 1382 times
fixstuff555
 
Posts: 151
Joined: Thu Oct 21, 2010 3:24 pm

Re: COM port appending NUL to string...

Postby Embedded » Sat Apr 30, 2011 1:48 pm

You have added (or copied) a New Line (NL) component to the Data input of the Comport. This will add a <CR> to each data transmission (used for terminating the string for some boards).

Just delete this NL Component.
Embedded
 
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm

Re: COM port appending NUL to string...

Postby fixstuff555 » Sat Apr 30, 2011 5:34 pm

I need the new line carriage return. What I don't need is the NUL it adds to that. I'd actually prefer a way to append a 0D hex and 0A hex (CR+LF). The input to the COM primitive is a string. I'd prefer raw data, that I would convert a string to if I wanted to.
fixstuff555
 
Posts: 151
Joined: Thu Oct 21, 2010 3:24 pm

Re: COM port appending NUL to string...

Postby DSP » Mon May 02, 2011 11:22 pm

Not sure about the NUL char being added to the sting, I haven't seen that?

If you want to work with raw data then just use the Hex mode on the comport module.
DSP
 
Posts: 150
Joined: Fri May 14, 2010 10:55 pm

Re: COM port appending NUL to string...

Postby fixstuff555 » Wed May 04, 2011 2:46 am

Yeah, thanks for that. For some reason I thought that the hex mode was for received data only. In hex mode, there isn't a null sent, its just plain hex data, which is fine. I also figured out the com port thing a day or two ago - the drop down lists are 0 based, which is why you had to add a 1 to it; makes sense.
fixstuff555
 
Posts: 151
Joined: Thu Oct 21, 2010 3:24 pm


Return to General

Who is online

Users browsing this forum: No registered users and 86 guests