LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending cntl-D as a string

How can I send a CNTL-D via a string control to the serial write.vi? No matter what I do I can't seem to send this as correctly and I need to be able to use this to stop a serial device from sending data. Any good ideas out there?
0 Kudos
Message 1 of 6
(3,257 Views)
Ctrl-D in the ASCII set is actually a hex 03... just cast the U8 hex value
03 to a string ( cast is located in the Advanced-Data Manipulation palette)

Good luck,
Bill

drval wrote in message
news:506500000008000000634E0000-1023576873000@exchange.ni.com...
> How can I send a CNTL-D via a string control to the serial write.vi?
> No matter what I do I can't seem to send this as correctly and I need
> to be able to use this to stop a serial device from sending data. Any
> good ideas out there?
0 Kudos
Message 2 of 6
(3,257 Views)
Thanks for the input but I guess I'm just too long away from "working in the trenches" at the low levels of serial interface. I understand what you've posted but can't seem to get it to work correctly. Can you post me an example of the U8 hex of 03 being cast to a string?
0 Kudos
Message 3 of 6
(3,257 Views)
drval,

Place a new string control on a front panel. Right-click on it and select Hex Display. Type '03' into the string control. You now have a Ctrl-D.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 6
(3,257 Views)
Actually this is what I did so here's the problem. This doesn't work to stop the device from transmitting data. When I'm using Hyperterm and I hit CNTL-D, the device stops sending data. I thought I was entering the code incorrectly but I see now that I was, apparently, entering it correctly but it was not having the correct effect.

Any other ideas about this?
0 Kudos
Message 5 of 6
(3,257 Views)
Ctrl-D is the ASCII "End Transmission" character and is 04hex, not 03hex.


LabVIEW, C'est LabVIEW

0 Kudos
Message 6 of 6
(3,257 Views)