help with Siemens S7

DLMUK

Member
Join Date
Jun 2013
Location
Southampton
Posts
311
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 would guess that it is to do with the DWORD usage. Though a Real number does use a double word for storage you won't read it using DWORD, I would expect to use something like REAL. I don't use RedLion stuff and I don't want to go deep in to the manual. If you wait a while you will probably get a RedLion expert to help you.
 
I know the code above works as it is part of an old working system which is being replaced.

What I suspect is that the address I am using is incorrect.

I have been told the data block the values are in but not the address. Is anyone able to pick out the address of the DWORDS from what I posted above?

I have only seen the S7 programmed using SIMATIC which has a very obvious field showing the address.

Many thanks
 
Assuming the structure definition matches DB 108 in the S7 plc, and an unsigned variable occupies 16 bits, then here are the addresses:

rldb.jpg
 

Similar Topics

Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
883
Hi, I have a customer with a S7300 from around 2013 which they link to approx 25 inverters, 3 DP to DP converters and 5 IM153 remote I/O units...
Replies
8
Views
320
Hi all, First, thank you for reading the thread. So I had a task as the following: An up-counter must be programmed as part of a batch-counting...
Replies
7
Views
287
Hi I’m after some help , I have a plc program with a baumer verisens vision camera attached I have got the signals working ect but I have an...
Replies
9
Views
958
Good, Code Totalizer: IF ( Hour = 23) and ( Minute = 59) and ( Second = 59) THEN totalizerDay_previous : = totalizerDay; totalizerDay= 0; End_IF...
Replies
8
Views
1,564
Back
Top Bottom