Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

READ serial data from ECU using LabView

Hi there LabView experts,

 

I am facing some issues reading some data received from an ECU unit. The real time data are transmitted through a serial RS232 interface continuously. I am supposed to be reading data from ten different outputs (RPM, oil pressure, Voltage...etc) but at the moment I can only read the voltage because I only have a power supply connected to the ECU. That, I suppose of course (I might be getting zero values for the rest of the outputs). The data are all 16bits, binary, LSB first including header bytes. All RS232 levels at 57600, 8 bits, 1 stop bit, no parity running at 10Hz. I have designed a VI which reads the data but not in the right format. Also, I have sent these data to my pc without using LV, by Putty, similar to hyperterminal, and the format seems to be a bit different than the one from LV as well, which is wierd. Anyone could maybe be so kind giving me some hints/ideas how to solve this issue?

 

Thank you in advance

 

Regards

Stav

0 Kudos
Message 1 of 6
(4,774 Views)

please post your LabVIEW software, so we can take a look at it.

greetings from the Netherlands
0 Kudos
Message 2 of 6
(4,768 Views)
0 Kudos
Message 3 of 6
(4,764 Views)

Your delay before the read doesn't actually delay before the read because there is no data dependency. If you want the delay to occur then you need to put a wire through the sequence in order to have the loop depend on data that is generated by the sequence. Alternatively, you can use the Time Delay Express VI and wire the error cluster through it.

 

Within the read, you said that the information is sent continously. How do you know when the start of the frame occurs? Also, the code isn't doing any kind of conversion so I don't know what you mean by "right format". If you can provide an example of the "right format" and the "wrong format", that would help.

0 Kudos
Message 4 of 6
(4,741 Views)

Right,

 

First of all thank you for the reply.

 

I'll try to modify the vi for i) delay , and ii) convertion. The data are sent from the ECU continuously, I don't really know when the start of a frame could occur or how to find out when the frame occurs.I'll attach the manual, I think it will help, if you could have a quick look at it (page 62, RS323 stream). By 'right' format I mean something that is probably ASCII and not that  '' ²‰ØþÐÐ yyyy ''. 

 

Thank you, I hope that answers all your questions...

 

Regards

0 Kudos
Message 5 of 6
(4,731 Views)

I would also put the visa close after the while.

greetings from the Netherlands
0 Kudos
Message 6 of 6
(4,719 Views)