PLC as Data Concentrator...

I can't even begin to tell you guys how happy I am right now. :p

After spending all day yesterday and this morning banging my head against the wall, reading everything I can get my hands on, and getting frustrated to no end, I finally have some results!

I took the example MODBUS program that milldrone recommended and I modified it to two MRX commands.

MRX

Port Number: K2
Slave Address: K1
Function Code: 03
Start Slavce Memory Address: 40001
Start Master Memory Address: V2000
Number of Elements: K10
MODBUS Data type: 584/984 Mode
Exception Response Buffer: V400

MRX

Port Number: K2
Slave Address: K1
Function Code: 03
Start Slavce Memory Address: 40033
Start Master Memory Address: V2033
Number of Elements: K10
MODBUS Data type: 584/984 Mode
Exception Response Buffer: V400

I tried to get this working yesterday but I had some conflicts. My RX LED was on steady, so I did some troubleshooting and found my +/- wires backwards. A quick swap and I was okay... until I tried to poll for some data.

Every time I tried to get data, I had errors. EVERY time. I swapped the port configuration, changed the baud rate, you name it. I gave up and went home for the day.

Today I stopped and asked myself; What is the DEC-550 looking for in the communications cycle? Modbus obviously, 19200 baud, 8N1... I checked the PLC and sure enough, I had not set the "Port 2" to N (default is odd?) and I had not saved the "Port 2" configuration to the PLC. (Dumb mistake!)

A quick change and BINGO! Tx/Rx are blinking like mad, and my PLC is polling the network without errors! :cool:

Now all I need to do is figure out how to address the V-memory slots as an input to my analog 0-10 VDC output cards and my relay outputs... :unsure:

Quick question: Is it proper to setup the "Number of Elements: K10" using the K instead of V10? (V10 changes to TA10 for some reason, and the counters do not show activity... anyone care to explain why?)

Thanks again for the hints, tips, links and suggestions everybody! I appreciate it!

Mark
 
Last edited:
Steve Bailey said:
One of the annoying things about serial communications is that there are a lot more ways to get it wrong than to get it right.

Ain't it the truth? (y)

I should have known better... I used to play with serial connections between PC's YEARS ago... everytime it didn't work it was something small that I overlooked.

Funny that I forgot that until just recently. :oops:

Mark
 

Similar Topics

Just came across a configuration that I am not familiar with. In this configurartion, there are several PLC 5/40E rack with local analog I/O cards...
Replies
5
Views
7,284
Hi, Wy we log data in PLC using DLG instruction, when we have option to log data in HMI
Replies
1
Views
82
Hi Iam using monitouch hmi(V9 soft) with omron plc cj2m (CX programmer). In this I want to read a data from hmi to plc. The data was like...
Replies
0
Views
106
I am working with beckhoff plc in twincat 3 environment. I have a array of struct which I want to make persistent. I declared it with...
Replies
0
Views
114
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
301
Back
Top Bottom