Skip to Content
|8/6/2010 5:57 PM|
Last visit: 2/20/2017
I have a S7- 1214 CPU connected to a Sentron PAC 3100 via Modbus RTU.
I am trying to access
Total active power
Total reactive power (VAR1)
How do i set up a DB to monitor the values in these registers?
How do i reference the register in the PAC that holds this data? (i.e. what part of the DB do i access?)
Thank you for your help
|8/9/2010 8:35 PM|
Last visit: 2/19/2017
In this Manual (Manual SENTRON Expansion Module PAC RS485), you will see at p.35 that the registers for the values you mention are:
start register 63, 2 regsiters wide: Total Apparent Power value type: Float Unit: VA
start register 65, 2 regsiters wide: Total Active Power Float W
These can be read using the Modbus function code 3 or 4
A float is 32 bit wide, and a modbus register typically 16 bit wide.
Therefore two consecutive registers are used.
In the S7-1200:
The MB_COMM_LOAD function block configures a port on the Point-to-Point (PtP) CM 1241 RS485 or CM 1241 RS232 module for Modbus RTU protocol communications.
The MB_MASTER function block allows your program to communicate as a Modbus master using a port on the Point-to-Point (PtP) CM 1241 RS485 or CM 1241 RS232 module.
The MB Master has the following parameters (among others)
MODE: Mode Selection: Specifies the type of request: read, write, or diagnostic
Mode 0 allows to read registers (see page 191 of the system manual of the S7-1200)
DATA_ADDR: Starting Address in the Slave: Specifies the starting address of the data to be accessed in the Modbus slave.
If you use 30063 as data_addr, you will read starting from register 63
DATA_LEN: Data Length: Specifies the number of bits or words to be accessed in this request.
Here you specify 4 registers (to read from 63 to 66 at once and get both data with one request)
DATA_PTR: Variant Data Pointer: Points to the CPU DB address for the data being written or read. The DB must be a "NOT symbolic access only" DB type.
Here I would try to define a DB with a named structure with the two floats in it.
This contribution was helpful to
2 thankful Users
|7/7/2016 3:25 PM|
Last visit: 2/23/2017
New question published by AutoGen_1020194 is split to a separate thread with the subject CB1241 connection to PAC 3100.