slotimport Posted December 26, 2010 Share Posted December 26, 2010 Hello How can I do to get a blinking led (half second on, half secon off) non dependig from any input / output? I need a sequence, and then call it from led expression? I get no experience with sequences. Thanks, Oscar. Link to comment Share on other sites More sharing options...
AzeoTech Posted December 27, 2010 Share Posted December 27, 2010 The easiest way is to actually use a symbol control and use the blink expression to make it blink. The blink rate is determined by the refresh rate of the screen. If you want to script it, you'd need to create a variable that the LED component displays the status of, and then toggle that variable. So, let's say you have an input channel called MyChannel, and you want the LED to be off when MyChannel is 0 and blink when MyChannel is anything else. Use something like this: global myChannelBlink = 0 read(myChannel) // ensure we have a value read while(1) if (myChannel[0]) myChannelBlink = 1 endif delay(0.5) myChannelBlink = 0 delay(0.5) endwhile Then have the LED component look at myChannelBlink for its state Link to comment Share on other sites More sharing options...
vovganf Posted June 1, 2011 Share Posted June 1, 2011 ok! if i have very many leds and i use one script => very big delay! exist universal function "blink" for component.panel.BackColor or leds? my english bad))))russia Link to comment Share on other sites More sharing options...
AzeoTech Posted June 1, 2011 Share Posted June 1, 2011 No. Use a symbol component instead, it has a blink Expression. Can you post your script (or better, your .ctl document) to make it blink. There may be a simple reason for the big delay. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.