seroke Posted June 19, 2023 Report Posted June 19, 2023 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.. Quote
Gambit Posted June 19, 2023 Report Posted June 19, 2023 (edited) See The + on the bottom of the OR block. You can extend the inputs 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 June 19, 2023 by Gambit Quote
AndreasW Posted June 19, 2023 Report Posted June 19, 2023 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 Quote
Nightfly Posted June 19, 2023 Report Posted June 19, 2023 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. Quote
seroke Posted June 20, 2023 Author Report Posted June 20, 2023 Hi @AndreasW , can you show an example pls_ ? i couldnt do this :/ Quote
Gambit Posted June 20, 2023 Report Posted June 20, 2023 (edited) This is what @AndreasW is writing about 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 Edited June 20, 2023 by Gambit Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.