wago modbus

This is my only hold up on converting the program from the Schneider M340 to the wago.
Kind of sucks.
 
Dont know about wago but in my world this doesnt work..

ReadData:= Receive.Data; (Both are arrays of word I assume)

Either copy with for loop or the syscopy function dont remember the name.

EDIT

Maybe It works.. Codesys 3 accept this..
 
Last edited:
I was actually just thinking about how I could do this.
I wish I could do this.
You know, kind of like wire shark/ethereal.
I don't know how I could do this as of yet.




There used to be an app called hyperterminal, even the ancient kermit should be able to do it.


It's been a while, so the following might not be exactly right.



IIRC you make a pigtail into the RS-232 cable, connect the sniffer port's Rx pin to the sniffed port's Tx pin, and also the ground. No flow control, neither soft nor hard.


If it's RS-485 the cabling even simpler because all data are essentially broadcast.


Set baud/startbits/stopbits/parity and the data should show up. obviously you'll need some way to deal with non-ASCII characters, but most of these apps can capture to a file, which you can look at in hex; some might even display hex on the fly.
 
Another tip.

The start to the modbus block needs to be set.. The block itself should reset that bit when done..

Maybe you are toggling this bit before the read is done and therefore your case switch doesnt copy the data to your variable.
 
Another tip.

The start to the modbus block needs to be set.. The block itself should reset that bit when done..

Maybe you are toggling this bit before the read is done and therefore your case switch doesnt copy the data to your variable.

good idea as the execution rate is at 15 milliseconds.
But I slowed it down to 15 seconds and no juice.
 
good idea as the execution rate is at 15 milliseconds.
But I slowed it down to 15 seconds and no juice.

Did you change back to the correct register? Because I cannot find any register 16#24 if I do a quick check in an altivar manual.
And also I think you need to have the Read_Qty set to 1 if you didnt already.

And lastly did you have an alarm while reading so the answer should be non zero? Dumb questions but people can tend to miss things when they get frustrated..


A cheap way to check RS485 comms (Modbus RTU etc) is using a usb - rs485 cable and for example putty.
I would manually trigger your send and see what goes out and if there are anything coming in..
 
Another tip.

The start to the modbus block needs to be set.. The block itself should reset that bit when done..

Maybe you are toggling this bit before the read is done and therefore your case switch doesnt copy the data to your variable.

I was able to read for the first time today.
Stepping it through manually seemed to do the trick.
Going to do some more testing tomorrow.
It appears (yet to be confirmed) that switching between reads and writes w/ the function causes it to bucker up.

Also, when I don't get data, the time from when the start of the function starts and when it completes is almost always 2ms.
When it works, it is from 20-28 ms.
When it is faulted and a run cmd is issued, it is like 500ms. Default timeout when a timeout isn't set?

Also, it doesn't clear the data from read to write.
 
I figured out the problem.
The timer was resetting the "start" tag before the instruction had time to receive the reply.
 

Similar Topics

I have a project to setup base programs across multiple PLC platforms that can be used for Modbus communications to various sensors that have...
Replies
0
Views
117
Hi, I have never used modbus communication in Codesys 2.3, any tips and tricks are much appreciated. The system is a Wago 750-881 that controls...
Replies
3
Views
1,833
Hi, For some time I have been struggling with establishing a MODBUS RTU communication between WAGO PFC200 750-8212 and a Sentera ACT-125-H damper...
Replies
15
Views
4,730
I am looking for a tool to backup/restore all my retentive located data from a wago 750-862 via modbus tcp. The wago address 12,288 equates to MW0.
Replies
11
Views
2,773
Hello guys, I am new to WAGO PLCs and e!****pit. I am trying declare variables from a Modbus Slave Connected using serial to WAGO PFC200 and pass...
Replies
0
Views
1,339
Back
Top Bottom