Posted 19 Jun 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.. Share this post Link to post Share on other sites
Posted 19 Jun 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 19 Jun 2023 by Gambit Share this post Link to post Share on other sites
Posted 19 Jun 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 Share this post Link to post Share on other sites
Posted 19 Jun 2023 I call this the not-not in my head. 1 person likes this Share this post Link to post Share on other sites
Posted 19 Jun 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. Share this post Link to post Share on other sites
Posted 20 Jun 2023 Hi @AndreasW , can you show an example pls_ ? i couldnt do this :/ Share this post Link to post Share on other sites
Posted 20 Jun 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 20 Jun 2023 by Gambit Share this post Link to post Share on other sites