新手急问labwindows中关于“串口读取数据问题”
用Labwindows编写一个仪器的串口读取程序。不知道从串口读出的数据如何转换成十进制数。仪器说明书中对数据描述如下:
“ion signals are represented as integers in units of 10e(-16) amps, and transmitted directly in hex format( four byte integers, 2's complement format, Least significant byte first) for maximum data throughput”
不明白说明书中传输的数据是什么样的? 我第一感觉是“FFFF”之类的字符串,但试了一下,发现结果不对。
char data_1[4];
InstallComCallback(1,LWRS_RECEIVE,4,0,0,NULL);//判断是否有数据
ComRd(1,data_1,4);
请问如何把data_1转换成十进制数,谢谢!