Pulsing Simultaneous Relays

I have a projector screen with a broken mechanical limiter to stop the screen when it lowers/raises. Replacing the screen is not an immediate option, so I need to figure out a way to send the up and down commands to the motor simultaneously. The wall control override has a "stop" button which simply crosses the two power leads, causing a momentary short which stalls the motor.

I'm going to try this code next (NI-3000 controller)

PULSE [dvSCRN1,2] //lower screen
wait 150 //give screen time to drop
PULSE {{dvSCRN1,1], [dvSCRN1.2]} //send lower and raise at same time

I've tried a few variations on this, and haven't had any success getting two relays to fire at the same time. I'm hoping I'm just making a dumb syntax error, and that firing two relays simultaneously isn't an option.

Comments

  • viningvining X Member Posts: 4,346
    Check to see if they're in the DEFINE_MUTUALLY_EXCLUSIVE section. If they are comment the line out until your limiter is repaired.
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    If your SET_PULSE_TIME is set to the default of 0.5 seconds, then simply doing
    pulse[dvSCRN1,1] 
    pulse[dvSCRN1.2]
    

    Should pulse both relays "simultaneously". They won't get triggered at exactly the same time, since one will execute a few milliseconds after the other but that shouldn't matter in your case. Netlinx being single threaded, there is no way to do things exactly simultaneously.
    Paul
  • ColinColin Junior Member Posts: 51
    Jason Lowe wrote: »
    I have a projector screen with a broken mechanical limiter to stop the screen when it lowers/raises. Replacing the screen is not an immediate option, so I need to figure out a way to send the up and down commands to the motor simultaneously. The wall control override has a "stop" button which simply crosses the two power leads, causing a momentary short which stalls the motor.

    I'm going to try this code next (NI-3000 controller)

    PULSE [dvSCRN1,2] //lower screen
    wait 150 //give screen time to drop
    PULSE {{dvSCRN1,1], [dvSCRN1.2]} //send lower and raise at same time

    I've tried a few variations on this, and haven't had any success getting two relays to fire at the same time. I'm hoping I'm just making a dumb syntax error, and that firing two relays simultaneously isn't an option.

    You seem to have a full stop in your second relay

    PULSE [dvSCRN1,2] //lower screen
    wait 150 //give screen time to drop
    PULSE {{dvSCRN1,1], [dvSCRN1,2]} //send lower and raise at same time
  • Jim DonachiueJim Donachiue Junior Member Posts: 82
    Colin wrote: »
    You seem to have a full stop in your second relay

    PULSE [dvSCRN1,2] //lower screen
    wait 150 //give screen time to drop
    PULSE {{dvSCRN1,1], [dvSCRN1,2]} //send lower and raise at same time

    You seem to have a curly brace where you should have a square bracket...LOL

    PULSE [dvSCRN1,2] //lower screen
    wait 150 //give screen time to drop
    PULSE {[dvSCRN1,1], [dvSCRN1,2]} //send lower and raise at same time[/QUOTE]

    Will this actually work?
    Will Pulse take multiple DevChans?
    Tested
    PULSE will not take multiple DevChans.
  • AuserAuser Junior Member Posts: 506
    Jason Lowe wrote: »
    I have a projector screen with a broken mechanical limiter to stop the screen when it lowers/raises. Replacing the screen is not an immediate option, so I need to figure out a way to send the up and down commands to the motor simultaneously.

    This won't help with your code issue, but that be dangerous territory you're entering. Without knowing your exact situation, what will the result be if the motor controller doesn't get the stop command? Screen winding back up on itself and getting damaged? Screen canister falling from the sky (seen this before)? Motor bursting into flames?

    There are multiple reasons why a motor controller wouldn't see a contact closure from a control system, or see the closure but not act on it, and though it may happen rarely this could create a hazardous situation. Hardware limiters are there for a reason...
Sign In or Register to comment.