pszczepan Posted February 6, 2012 Report Posted February 6, 2012 I'd like to make button blinking when alarm is active. the long way is to make ladder to switch on some address to control flicker indirect. I have many alarms and I am thinking to use macro. I can start blinking when I use common macro for alarms - "On timing alarm is occured" and it works - correct. I have problem to stop blinking. In my project all alarms are canceled automaticaly when they are become inactive. Macro "On timing alarm is canceled" does not work for me. Is there any way to switch off some address when no alarm is activated? Hm Thanks for clue Quote
lostcontrol Posted February 8, 2012 Report Posted February 8, 2012 The NS alarm log allows for the no of alarms active to be mapped to a memory area of your choice. You could use this to set a bit (either via macro or PLC) to give the flashing indication you desire... I am not next to CX-Designer at the moment, but that should be enough for you to experiment. Let us know if you need more info. Quote
BobB Posted February 8, 2012 Report Posted February 8, 2012 I would think the easiest way would be to put a 1 second clock pulse in the PLC program in the output bit line to the screen on an individual basis. Simple to add in the PLC. Quote
pszczepan Posted February 9, 2012 Author Report Posted February 9, 2012 (edited) I used $W18 where is number of active alarm and it works - as Lostcontrol wrote Everything would be perfect but flicker options for Command button seems to work odd. I cannot switch ON and OFF whole button. I only get some thin frame around the button which flicker. I changed all options - whole object and others but still the same. Whole object can flicker only if the object isn't a "Select shape" Lamp type. For Command button always there is a shape. I think to leave flicker if it doesn't work and make display button using indirect control flag. If I use PLC address to control flag I have some delay when I change the screen and it doesn't satisfied me. Can I find any internal bit of NS which fe. become ON and OFF every 1 second. Finally I want to get blinking Command button when alarm is active using just macro without using PLC address. Edited February 9, 2012 by pszczepan Quote
pfort Posted February 10, 2012 Report Posted February 10, 2012 I dont remember for sure but i think it is a 1 sec pulse Quote
BITS N BYTES Posted February 10, 2012 Report Posted February 10, 2012 (edited) I would NOT use the run signal pulse. There is no 1 second on/off bit in the NS but it is very easy to create one in a macro. Select "Project Property" -> "Macro" -> "On change of an address value" select "When a value changed Set5". Enter the NS system clock $SW14 as the address. You now write a simple macro that turns an internal bit in the NS ON/OFF each second. The attached example turns $B1000 ON/OFF each second, you can now use this globally for any object on your screens. Edited February 10, 2012 by BITS N BYTES Quote
pszczepan Posted February 10, 2012 Author Report Posted February 10, 2012 $B101 I set as BITS AND BYTES wrote (thanks for clue) and when I test offline it changes values every 1 second - perfect Next I want to use $B101 in alarm number macro First I check if $W18>0 if it is =0 then $B100 should be 0 IF $W18>0 I make macro4 Value of $B100 ( control flag for command button) depends on $B101 It looks like it should work but it doesn't - hmm The command button should be ON when there is no alarm. When any alarm occur ALARM button should be ON/OFF every 1 second 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.