Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR10X+ModBus: P222 documentation


matern Feb 10, 2010 09:41 PM

Hi

We upgraded the OS in a CR10X to the ModBus enabled version and it runs fine when using the CS-I/O port. Unfortunately this port is actually not available as it is used to upload data through a modem. After reading the documentation of the P222 instruction (MODBUS Initiate Telecommunications) I'm still not sure if the CR10X supports ModBus through any of the control ports...

From the manual: calling mode parameter

+++++
A code in the form of ABCD, which is used to set the calling mode in the instruction. If this parameter is indexed, the baud rate is 1200 bps. Otherwise, the baud rate is 9600 bps.

[A and B removed]
C
4 CS I/O port
5 Control port, no break
6 Control port with break

D
X Enter the number for Control port 1 - 7, TX
X1 Enter the number for Control port 1 - 7, RX
If C = 4 (CS I/O port), enter 0 for D.

+++++
If I understand it correctly I can set C to 5 to route ModBus through a control port and D to 1 to have TX on C1.

But what does the X1 mean???
Will it be a TTL TX/RX interface?

Thanks
Thomas


Karl Feb 11, 2010 11:11 PM

Thomas,

Thank you for brining this to our attention. There is a misprint in the help. The section for 'D' should read as follows:

D
X Enter the number for control port 1 - 7, TX.
X + 1 Enter the number for control port 2 - 8, RX.


Where X is the control port number and X + 1 is the next control port (i.e. if you are using control port 5 for TX, then the parameter for 'D' would be 56).

Also to answer your last question - yes TTL levels are used.


matern Feb 14, 2010 08:11 PM

Hi

Thanks for your answer.

Unfortunately the parameter D is just one digit so I can't enter '56'.

I think I can choose any value for X between 1 and 7 to specify the TX port while the RX port will be the next (X+1)? So if I use D=5 then C5 will be the TX port and C6 the RX port.

I'll test that, just have to find a TTL to RS485 converter...

Cheers
Thomas


matern Mar 4, 2010 12:01 AM

Hi

I finally got some interface converters to do some more testing and I found several issues:

- the logger uses TTL levels but they have the opposite polarity as expected: RS232 is at -12V when idle while TTL usually is at +5V when idle. The logger keeps the control port at 0V when idle so it's basically an RS232 interface at TTL level. Additional inverters are required when the logger is connected to any "normal" uC or TTL-to-RS232 converter.

- everything seems fine when the logger is a Modbus Master (command 1 or 2) but when used as a device (command=0) the logger doesn't respond to any requests through the control ports. Even worse is the fact that the logger still responds to Modbus requests through the CS I/O interface even though it is configured to use the control ports.

My configuration: TX (data from logger) on C1, RX (data from PC) on C2, non-inverting level shifter (-12V->0V and +12V->5V) between logger and RS232
Command used:
3: ModBus Initiate Telecom (Special) (P222)
1: 0051 Calling Mode
2: 2 Flag 2
3: 1 Modbus Address
4: 0 Number of Retries
5: 27 Result Code Loc [ ModRes ]
6: 0 Command
7: 0 Swath
8: 1 Local Loc [ SampleID ]
9: 0 Remote Loc

This setup still returns values through the RS232 port (it should not) but not through the C1/C2 ports (it should).

Has this ever been tested?

Cheers
Thomas

Log in or register to post/reply in the forum.