Industry Online Support
Technical Forum
3/9/2010 5:48 PM | |
Posts: 54 Rating: (8) |
Hi Evandro, The common way to display the status door open is to set a plc alarm message. You write that you want use custom screens to display different status information. It is not quite clear to me are you inside or outside of the customer area when your screen will be displayed. Using custom screens outside is not possible. I make following assumptions to give hints: -You have a special screen and that screen is mostly shown to operate at the machine -You want show PLC status information together with other things (for instance input fields) - You know the PLC address (input, memory or variable address) The timer tag has to use to display dynamically events. You need an if-condition to find out if the door has opened or closed. With that information you can show a picture or a text at certain position. You have to read a byte and mask the value with the bit number to find the set /reset status. You cannot use a bit-operation at the moment. I use memory byte 1 (mb1) and the bit 0 to simulate the plc door bit in the example. <DialogGui> <let name="door_byte">0</let> <let name="door_byte_old">0</let> <menu name = "MAIN"> <open_form name = "main_form" /> <!-- soft-key displays and changes the door status --> <if> <condition>("plc/mb1" & 1) == 0</condition> <then> <softkey POSITION="1" picture="f:\appl\red_led_off.bmp" > <caption>close%ndoor</caption> <op> "plc/mb1" = "plc/mb1" | 1 </op> <navigation>main</navigation> </softkey> </then> <else> <softkey POSITION="1" picture="f:\appl\red_led_on.bmp"> <caption>open%ndoor</caption> <op> "plc/mb1" = "plc/mb1" & (255 - 1)</op> <navigation>main</navigation> </softkey> </else> </if> </menu> <form name="main_form"> <init> <caption>Show door </caption> <!-- create your controls --> <!-- control used to display the plc variable (test only) --> <data_access type="true" /> <control name = "door_test" xpos = "440" ypos = "212" width="80" refvar="plc/mb1" hotlink="true" /> <!-- init --> <op> door_byte_old = 255 </op> </init> <timer> <!-- 1 = bit number (bit 0) --> <op> door_byte = "plc/mb1" & 1 </op> <print text="%d">door_byte</print> <if> <condition>door_byte != door_byte_old </condition> <then> <op> door_byte_old = door_byte </op> <if> <condition>door_byte == 0 </condition> <then> <!-- door not closed if 0 indicates an opened door--> <img name ="f:\appl\door_o.png" xpos ="10" ypos = "24" /> </then> <else> <img name ="f:\appl\door_c.png" xpos ="10" ypos = "24" /> </else> </if> </then> </if> </timer> </form> </DialogGui> Attachmentbmp.zip (186 Downloads) |
Last edited by: drill_easy at: 3/9/2010 6:33 PM |
|
3/10/2010 7:46 AM | |
Joined: 4/24/2009 Last visit: 8/20/2024 Posts: 2682 Rating: (135) |
Thread closed, because question is already discussed in the following thread 802D SL Screens. Best regards O_Moderator |
Follow us on