11-03-2008 04:53 PM
I downloaded 8.2 version of labview libray and tried to use serial port to test master/slave example provided...
For some reason null modem solution doesn't work for me (I tested communication succesfully using RS-232 example)
P.S. I do get timeout on reading...
Any comments will be appreciated
Greetings,
jack
Solved! Go to Solution.
11-03-2008 05:06 PM - edited 11-03-2008 05:07 PM
See here for some modbus cable pinouts. But it really depends on the devices your are connecting. Most can be done with pins 2,3,5 on 9 pin connectors. Maybe some jumpers on each end. Usually you do not need more than three wires end to end.
http://www.control.com/1026148199/index_html
11-03-2008 05:23 PM
11-03-2008 06:46 PM
For RS-232, you will need at least 3 wires. Pins 2 and 3 (one is receive the other transmit) and pin 5 (ground). In a null modem cable, pins 2 and 3 are crossed between the two ends. In a straight through cable, pins 2 and 3 are wired straight through. (Pin 5 is straight through in either cable).
Other pins handle handshaking lines. Whether you need them or not depends on the device you are communicating with.
Check the manual on the device you are trying to communicate with to see whether you need a null modem or straight through cable.
11-03-2008 08:16 PM
If it is on the same com port, you want a loopback connector.
See this page for loopback section.
11-11-2008 01:47 PM
11-11-2008 02:01 PM
11-11-2008 02:01 PM
I am really unclear on what you are trying to do.
Are you trying to have the same PC run the master and slave example at the same time, and do it by using a loopback adapter on a single com port?
If so, why? That doesn't make any sense.
The master example and the slave daemon both are reading and writing to the com port. If you have them both reading and writing to the same serial port, then the reads and writes are going to step all over each other between the two sets of VI's.
Please describe your setup in detail. How many PC's? How many serial ports on each PC? What VI's on each PC? What kind of cable to connect them?
11-11-2008 03:06 PM
Right, this is what I wanted to hear (that one can't use same port).
I will be able to continue from here...
thanks
11-11-2008 04:48 PM
I am still not out of the woods yet (can't make example "work" on my 2 PC's).
By the way, since I am controlling when writes/reads happen the examples should work on ONE COM port as well (of one machine).
First 1 write (let's say on master), then I read on slave...
What's wrong with this picture?
jd