11-11-2008 08:42 PM
jdownarzap2 wrote: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
How do you figure you are able to control when the writes and reads happen?
In the master example, the master writes the request, then reads the response.
In the slave example, the slave reads the request, then writes the response.
So the overall flow is
1. Master writes request.
2. Slave reads request
3. Slave writes the response
4. Master reads the response.
The master will read something on the Com port as soon as it is available, which would actually happen to be the request it had just written out. There is no way with the examples to have the two slave read/write operations interleaved with the two master write/read operations.
So you are trying to get this to work on 2 PC's?
What kind of errors are you getting? Are you using a null modem cable between the ports on the two PC's?
Going back to message 1, you said you were able to get RS-232 to work between the two PC's? But you can't get the Modbus examples to work? Are they running as two separate VI's or do you have them dependent on each other in some way. Perhaps you can post your VI's.
11-12-2008 11:03 AM
I appreciate your time/help with this issue (I am/was under-educated).
Anyway, I use 2 PC's connected through a null-modem cable and original examples from the modbus.llb.
P.S. Please disregard RS-232 test (as it perteined to 1 port (same machine)).
The error I am getting is as follows:
Error -1073807246 occurred at VISA Write in MB Serial Transmit.vi:5->MB Serial Master Query.vi:4->MB Serial Example Master.vi
Possible reason(s):
VISA: (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.
tx
11-12-2008 12:17 PM
Check to make sure that no other program has the same serial port open.
You will know if you click on the control or constant where you define which serial port you want to use. If the port is already open, you'll see an icon next to the name that looks like 2 computers and a checkmark. If it is closed, then there will be no icon.
11-12-2008 12:31 PM
Hi,
You're absolutely right! (I have had an OPC server opening the port (automatically)...a leftover from a previous/continous project...)
By the way the "icon" you're seeing (with 2 pc's and a checkmark when port is allready open) ... I don't see it in version 8.2
jd
11-12-2008 12:41 PM - edited 11-12-2008 12:42 PM
This is in 8.6, but I'm sure I remember it being there even back in LV 8.2 and prior.
Com1 is already open. The other ports are not.
11-12-2008 01:36 PM
Well, I converted the I/O control to a constant (to replicate your picture)...and I don't see what you see (with COM1 already open I don't see the icon ...)
Anyway, it's not so important anymore (as I learned my lesson) but I have to agree it's VERY helpfull feature in general.
tx