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,454
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,010
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,089
hi all, i have a plc i need to get info from for a site im working on: I have a 1764 Micro Logix 1500 LSP Series C (See Attached Image) im...
Replies
2
Views
331
Hi to everybody. I need to read the first 12 characters of the message that a barcode reader sends to the ascii card (1734-rs232 ascii) and I...
Replies
8
Views
643
Back
Top Bottom