LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Ascii codes

I want to know how program the ascii codes of a string to send them by the serial port, using labWindows/cvi plantform.
0 Kudos
Message 1 of 4
(3,400 Views)
Please see the sample program "serial.prj" for serial communication we deliver with CVI and which you can find under \programs\National Instruments\MeasurementStudio\CVI\samples\rs232.
Regards,
Heinrich Illig
National Instruments
0 Kudos
Message 2 of 4
(3,400 Views)
What I really want is how to program the ascii codes of a string. Thank you very much for your answer
0 Kudos
Message 3 of 4
(3,400 Views)
ComWrt() writes a string directly. You don't need to know the ASCII codes and your program doesn't need to convert the string to an array of ASCII codes.
/*------------------ Prototype -------------------*/
int ComWrt (int COM_Port, char Buffer[], int Count);
For example, to write all of myString to COM1:
bytesWritten = CmWrt (1, myString, strlen(myString));
0 Kudos
Message 4 of 4
(3,400 Views)