Reading multiple bits at once

bte001

Member
Join Date
Jul 2015
Location
russ
Posts
1
I'm using Siemens S7.

I've an an alarm list of more than 2000 alarms stored from DBX0.0 to DBX379.7.

I'm accessing to the PLC with a software in order to read those alarms and I dont know how to read a lot of bits at once.

I know if you have for example the alarms stored in bytes, you can 100 alarms in a row by using:
DB2.DBB180$100
Is there a way like this to read alarms stored in bits in a row?

Thanks in advance.
 
You can read up to 32 BOOLs at a time by using doubleword instructions.
For example

Code:
L DB0.DBD0
L L#0 
<>D 
= "error" // at least one bit is set.

For 2000 alarms you need to duplicate the above code 62 times, or loop through the alarms using pointers.
For the latter, I think you need assistance from a more experienced programmer.
 
I'm using Siemens S7.

I've an an alarm list of more than 2000 alarms stored from DBX0.0 to DBX379.7.

I'm accessing to the PLC with a software in order to read those alarms and I dont know how to read a lot of bits at once.

I know if you have for example the alarms stored in bytes, you can 100 alarms in a row by using:
Is there a way like this to read alarms stored in bits in a row?

Thanks in advance.

What specific software?
 
For multiple words you could do:

Code:
L DBx.DBD0
L DBx.DBD4
OD
L Dbx.DBD8
OD
....
L L#0
<> D
= #Error

Or you could write a function that receives a pointer to the alarm data That can then be used to determine the length and fed in to a loop analysing all data for any bit set.

Nick
 
The way the 1st post is phrased, I am betting that bte001 has no knowledge of Siemens S7, maybe he has knowledge of WinCC but not the PLC part.

Rereading the 1st post, I realise that bte001 probably means how to address many bits not in STEP7 but in "a software", and this "software" may be WinCC or some other HMI or SCADA.
 

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,525
Morning, I have some source code from a ControlLogix Processor where they used a message function set as CIP Generic, service code 4b, class 93...
Replies
9
Views
3,051
Hi All, Hope someone can help here! I have an S7-315 2DP and a MicroMaster440 talking on profibus. I have the basics fine and can read the...
Replies
1
Views
4,096
Trying to setup a message read via Ethernet. I have the path setup as 1, 1, 2, 192.168.66.10 I get an error code 1, ext err 315. I am beating...
Replies
9
Views
226
Dear all, I don't know why setup of password became challenging and weird. After setting up the password and try to upload the ladder from the plc...
Replies
3
Views
166
Back
Top Bottom