DLMUK
Member
Hi,
I have no experience of Siemens PLCs at all. I have a guy who wants to take 4 values from an S7 and using a red lion CSMSTRSX. The info provided by them is below. I am looking to extract the 4 DWORDs at the bottom.
I have setup the RLC device to look at 0108:0000, 0108:0004, 0108:0008 and DB0108:0012. I have data coming through but not of a value we would expect. I am not sure the data being read is actually coming from the DWORDS. The data is in S7 floating point format.
Can anyone with Siemens knowledge shed any light on this?
thanks.
Datablock: 108
Slot: 2
Read: 25
Write: 50
Segment: 0
struct PLC111 {
WORD watchdogTimer;
struct {
unsigned :1;
unsigned lengthValid :1;
unsigned tensionValid :1;
unsigned speedDemandValid :1;
unsigned speedValid :1;
unsigned :3;
//
unsigned autoButtonPressed :1;
unsigned NSinControl :1;
unsigned :6;
} status;
DWORD length_km;
DWORD length_m;
DWORD tension;
DWORD speed_m_per_sec;
};
I have no experience of Siemens PLCs at all. I have a guy who wants to take 4 values from an S7 and using a red lion CSMSTRSX. The info provided by them is below. I am looking to extract the 4 DWORDs at the bottom.
I have setup the RLC device to look at 0108:0000, 0108:0004, 0108:0008 and DB0108:0012. I have data coming through but not of a value we would expect. I am not sure the data being read is actually coming from the DWORDS. The data is in S7 floating point format.
Can anyone with Siemens knowledge shed any light on this?
thanks.
Datablock: 108
Slot: 2
Read: 25
Write: 50
Segment: 0
struct PLC111 {
WORD watchdogTimer;
struct {
unsigned :1;
unsigned lengthValid :1;
unsigned tensionValid :1;
unsigned speedDemandValid :1;
unsigned speedValid :1;
unsigned :3;
//
unsigned autoButtonPressed :1;
unsigned NSinControl :1;
unsigned :6;
} status;
DWORD length_km;
DWORD length_m;
DWORD tension;
DWORD speed_m_per_sec;
};