RobotStudio event

Interrupt if TWO DO's are high

SteveMob
SteveMob
edited June 2016 in RAPID Programming
Hello,

I have a interrupt that is activated based on a Digital Output being set to high:
ISignalDO do1, 1, sig1int;
My question is, can I have this interrupt occur if TWO digital outputs are high? For example can I do something along the lines of this:
ISignalDO do1, 1, AND do2, 1, sig1int;
Would doing a group of signals be the way to go? If that's the case, can someone show me how to do it that way?
Thanks for any help!
SM

Post edited by SteveMob on

Comments

  • kioog
    kioog ✭✭

    Hello,

    the way to go is to use cross connection, you define a virtual signal (like normal IO but not assign a device) and make a cross connection for this virtual signal to your 2 real signals.
    then you use this virtual signal in your interrupt.

  • SteveMob
    SteveMob
    edited June 2016
    But I need to trigger the interrupt if 1 of the 2 real signals are high, so how would the virtual signal help me for the real controller? Or is it used as more of like a temporary signal type thing?

    Thanks,
    SM
  • So, what you want is to trigger the same TRAP procedure from two different signals.
    You can do it connecting your intnum var to the same trap.
    the TRAP will be triggered when any condition will meet.

    best regards,
     Daniel M.
  • soup
    soup ✭✭✭
    @SteveMob -- the virtual signal is setup in the real controller -- just like any other signal just instead of being tied to a physical bus like DeviceNet, it is connected to a virtual bus -- so as @Peter1 says and cross connect the two real signals to a virtual signal and look for that virtual signal in your RAPID.