Reading Modbus registers on slave device and validating data

carljbrooks

Member
Join Date
Nov 2018
Location
Staffordshire
Posts
2
Hello all,

I am relative new to PLC's.

I am looking to read 4 Modbus registers on a slave device via RS485 and then validate the data. Can a PLC be used for this?

Register 1, Asset ID
Read 'asset ID' and check against lookup table, if 'asset ID' is in the table move on.

Register 2, Location
Read 'Location' and check against lookup table, if 'Location' is in the table move on.

Register 3, Load Date/Time
Read 'Dispatch Date/Time' against current date/time and ensure 4 hours has not passed.

Register 4, Loaded Product
Read 'Loaded Product' and ensure it is equal to 'XYZ'.

If all data in the 4 registers is validated then switch control output.

Any thoughts are appreciated.
 
What PLC do you want to do this in?

If the said PLC has a modbus interface or modbus interface card, it's no problem reading registers from a slave.
 
You would read all 4 registers into the PLC first with one multiple register read command (assuming the register adresses are continuous). Then assess each register against the lookup table.

How big is the lookup table and how often would it change?

If it is large (1000+ entries) or needs to change more often than monthly, then I'd probably do this with a PC. Still read the registers with a PLC, but validate the data using the PC then signal to the PLC the end result of pass or fail
 
Depend on your application. I typically "validate" the data on a PC using one of the many free modbus Master simulator out there. You also need a RS485 to USB adopter for this.
 

Similar Topics

Hello, I'm able to read data from the slave with my master s7-1200 PLC. Now my task is to read multiple registers with address as follows...
Replies
2
Views
2,534
Hello guys, I used modscan32 before to read data using TCPIP based on given IP Address, Device ID and etc. The data I used to read in modscan32...
Replies
19
Views
4,051
Hello, i have a curios problem in a modbus tcp reading from a client. The HC900's answer for the variable 20 (holding register 6375) is clear in...
Replies
17
Views
3,119
Hi, I have been struggling for a week with FATEK FBs-24-MAR-AC PLC. My goal is to read voltage and current from a powermeter Elnet Pico 5. The...
Replies
8
Views
3,769
Hi all, Has any of you got any example of reading data from modbus tcp, using FBD? I am just trying to get my head around, doesnt look like a...
Replies
6
Views
2,531
Back
Top Bottom