seroke

Short way to write contacts in OR gate ?

8 posts in this topic

Hello All..

I have a block that does not look aesthetically pleasing.
I have around 200 alarms. And i connected all alarms to OR gate.
 If there is an alarm , M211 is on. M211 is for led and GOT alarm device.
Is there any short way to write this block? Because its not aesthetically :/ 


PLC: IQ-F/ FX5U

Thank you..

or.png

Share this post


Link to post
Share on other sites

See The + on the bottom of the OR block. You can extend the inputs

or_0.jpg

 

Also If you alll the  bits are sequential you can put them in a couple of Dwords and check if they are not 0

Or create an array and create a for next loop wich checks each bit /

Edited by Gambit

Share this post


Link to post
Share on other sites

as gambid wrote if all the bits are sequential you can check them as dword > 0 ( e.g  [>_U K8M0 K0] ) , in this case be sure to use _U so that K8M0 will be treated as unsigned word, by default its treated as signed word an this case it won't work if the upper bit is set

 

Share this post


Link to post
Share on other sites

I call this the not-not in my head. 

 

NotNot.jpg

1 person likes this

Share this post


Link to post
Share on other sites

 

As AndreasW said, if they are sequential then you can check they are a DWORD. Personally I always use the bits of DWORD's for alarms as it’s easier for the HMI to pull out of the PLC (as they are alarms the polling frequency is usually reasonable quick and needs to be done continually). For example pulling 4 DWORDS is usually much easier for the HMI to read from the PLC compared to 128 bits. Then you just have to check if any of the DWORD’s are not zero to generate the alarm.

 

Share this post


Link to post
Share on other sites

This is what @AndreasW is writing about 

alarmbit.jpg

In this eaxmple 5 x 16 bits starting from M1

alarmBit.gx3

But pref. you don't want to use devices in your programs but labels

Define the MyStartAdress as aan array of Bool 

 

alarmbit2.jpg

Edited by Gambit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now