ID:KB000003.htm
Question:

Can a Basic Script be run from the IL Logic?

Answer:

No direct command exists for executing a Basic Script routine from the IL logic. However, it can be done by using the following simple procedures:

 

  1. Set a Real Time DB variable to a certain value eg. 1 in the IL logic  with the necessary conditions for executing the script

  2. Create a new event  in the Project Explorer window's Event Object List and associate the variable, managed by the IL Logic, in its general properties with execution condition set at "=1"

  3. Insert the execution command of the desired Basic Script in the event's Command List

 

By doing this, each time the IL Logic changes the variable's value from "0" to "1", the event object will put the basic routine into execution mode. Take into account that the event is always executed on the condition's rising edge only, therefore once the variable has changed to "1", it must go back to "0" and then return to "1" before the event can be executed again.

References:

Additional query words:

Basic Script, IL Logic