11/11/2024 10:19 AM | |
Joined: 2/11/2024 Last visit: 7/23/2025 Posts: 22 Rating:
|
Hello to everyone, I am trying to use a HW Interrupt OB during runtime using the ATTACH instruction. I understand that a HW Interrupt OB can only be processed when a rising or negative edge is detected from the corresponding input. In this case, is the example used only as a reference to explain how the instruction works and it will not trigger the HW interrupt? Or does it require different HW to work properly? I attach my sample project as well. Thank you in advance. AttachmentTestingInterrupts.zip (154 Downloads) |
11/11/2024 11:09 AM | |
Joined: 2/11/2024 Last visit: 7/23/2025 Posts: 22 Rating:
|
Apologies if I did not made clear my problem. QUOTE When the normally open contact ("start") supplies the signal state "TRUE", the "ATTACH" instruction is executed and the event is assigned to the OB. With the value "FALSE" of the input parameter ADD ("add"), the event replaces all previous event assignments for OB40. The output parameter RET_VAL ("returnValue") indicates that processing took place without errors. When the normally open contact ("signal") in network 2 supplies the signal state "TRUE", the PLC tag "SLI_ATTACH_force" is set to the signal state "TRUE" and OB40 is executed. While OB40 is being called, the value of "testValue1" is transferred to "testValue2". When the normally open contacts ("start" and "signal") supply the signal state "FALSE", the values of "testValue2" and "SLI_ATTACH_force" are reset in network 4." UNQUOTE I follow the above instructions, however when I set the "Signal" variable in Network 2, OB40 is not executed even if the PLC Tag I0.0 is set. I manage to call the OB only when I actually apply 24V DC to Input I0.0 which is something different than the solution mentioned in the example. I am trying to see why the example mentioned in Help is not working. I attach also relevant pages from Help for better reference. Thank you. AttachmentATTACH instruction.pdf (170 Downloads) |
Follow us on