03-04-2013 11:17 AM
I have to communicate asynchronously with a UAV Engine's ECU using a National Instruments RS-422 card. I've been able to communicate in one direction, but not both directions.
Anyone have a VI that illustrates the proper methodology? Any info would be useful. Thanks
03-04-2013 01:29 PM
03-04-2013 02:29 PM
Thanks Albert for getting back to me. We have 5 pins wired. Pins 1,4,5,8,9. We are using the National Instruments PCI-8432 card. The card is suppose to handle 422 and 485 protocols, which I believe are electrically the same. I don't believe there is a switch between the two protocols. It has two ports and when I cable the two ports together, I can send data from one port to the other without a problem. I'll be sending a "heartbeat" packet with a CRC value to the ECU on the engine and listening to the return packet from the ECU with all the data such as cylinder head temp, throttle position etc. Trouble is, I don't know when to talk and when to listen.
03-04-2013 02:56 PM
Hi
In rs485 mode you need to tie the ports together but not in rs422 mode.
rs422 sends on one pair and recievs at the other, asynchronously.
Where rs485 sends and receives via a protocol and the send and receive lines are connected to one set, that either sends or receives.
maybe you have connected the send to send on the other side and also receive to receive. So you see you can send but nobody listens?
or is the endcharacter such that it is not recognised?
03-05-2013 07:25 AM
I didn't mean to accept the previous post as a solution, Sorry. I am not aware of a way to switch the card from 485 to 422. I thought that the two wires for transfer work together to produce 1 bit. The bit consisting of the difference in potential between the two wires and the same for the receiving pair. If you could upload a VI that illustrates what you are saying, I would greatly appreciate it.
03-05-2013 11:51 AM
03-05-2013 12:20 PM
Yes the 5 & 9 pins are connected, as well as, 4 & 8.
03-05-2013 12:35 PM
03-05-2013 02:22 PM
I hope the attached jpg image helps. I have just discovered on this NI Board a thread from 12-06-2009 which asks about "timed serial data transmission" from a man named 'jack1'.
The VI that you helped him with, will also be useful to me. Its what is inside the case statement that sends the data to the ECU that I don't know about.
I don't have the ECU to experiment with just yet, but what I've done is cable the COM ports between 2 computers together. I have no problems sending a Labview cluster converted to bytes along with a CRC value to the port and then reading the bytes and converting back to a cluster on the other machine. If I write and then follow with a read, won't I prevent the ECU from being able to read what I've written?
The serial connection to the ECU is on COM4. Will I open both a Read Port and a Write Port to this COM port and then time my reads and writes?
Thanks again Albert, you've been a big help.
03-05-2013 03:39 PM