Modbus data question.

dsking

Member
Join Date
Dec 2008
Location
ontario
Posts
66
Good Day All,
I'm stuck with this "minor" data issue, please help.
I'd like to display engine hours data on HMI and SCADA system. I've a PROSOFT MV146-MCM card with SLC 5/05 controller. LOgic had been written before to collect Data from CAT Engine EMCP through Modbus and everything worked fine untl recently when the engine hours displayed were incorrect.
The rawdata engine hours on N32:64 is now a -ve number. CAT says this the engine hours data is in 2 registers of 4Bytes each( i'm assuming N32:63 and N32:64)and that the resolution is 0.05hour/bit.
I'm struggling on how to use this information to correctly display the engine running hours.
I've recycled power to the PLC hoping to clear a corrupt regista=er but i keep getting the same -ve number.
I've attached the some logic for reference. Please help.o_O
 
The problem is that the Hours counter is 32-bit Unsigned integer.

The SLC-500 platform Integers are 16-bit Signed integers. The most-significant bit (bit 15) is the Sign; 0 for positive, 1 for negative.

Once the accumulated time got above 2^15, the highest bit was interpreted by the SLC-500 as a Sign bit, which is why the number now appears negative.

32768 counts of 0.05 hours each is about 68 days of runtime. Does that sound about correct ?

The SLC-5/05 doesn't have a Long datatype or an Unsigned data type, but most SCADA systems can treat two adjacent 16-bit Integers as an Unsigned or Long datatype.

Your other option will be to manually convert this Integer to a floating-point value in the controller. There are a handful of options for this, but let's take a look at the SCADA system first.
 
I'm using PanelView 32 for HMI and RSView 32 for SCADA and am not sure how to make them display the correct hours.
 
Hi,

Maybe, read one register, multiply it by 65535 then add the second register to the result. Or reverse, depending on the word order.

Make sure the result can handle the 32 bit number.
 

Similar Topics

I have 9 field devices, three METSEPM5110 power meters and six ACE949-2 rs285 interface modules. I want to read this Modbus rtu data through rs485...
Replies
8
Views
315
Hey all, I am trying to find a way to get data from a local device webpage into a modbus server for a customers SCADA. The customer was hoping...
Replies
3
Views
428
I am using a Beckhoff PLC and trying to convert a REAL to 2 WORDS to send over Modbus. Does anyone know how to do this? Also how would I convert...
Replies
5
Views
788
I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII...
Replies
7
Views
3,545
I've got 16-bit data at address 40200 on a Schneider Scapack 350. I can grab the data over Modbus TCP using Kepware at IP 172.16.1.100. When I...
Replies
8
Views
2,489
Back
Top Bottom