November 22, 2024, 10:26:16 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Prop-1 trigger

Started by JackMan, December 28, 2009, 02:47:38 PM

Previous topic - Next topic

JackMan

Can the Prop-1 be triggered using a Normally Open Relay connected to P6.W and P6.R (or P7.W and P7.R) with the jumper in the DN position?
Is it possible to trigger the Prop-1 from a 9VDC source without using a relay? Thanks!

JonnyMac

Yes, you can connect a set of N.O. relay contacts to the Prop-1; connect one contact to P6.W and the other to P6.R.  Move the P6 SETUP jumper to the DN position.  When the relay is closed the Prop-1 will see a "1" on P6 and can act on it.

You cannot connect a 9v source directly to an input without doing damage; you need to limit the current into the pin.  you can do this with a 22K resistor.

9v+ ------[22K]------ P6.W
GND ----------------- P6.B
  (Note this is connected to the B [ground] pin)

Be very careful with this; if you're not comfortable with electronics then you may not want to go this route.

Where is this 9v coming from?

Jon McPhalen
EFX-TEK Hollywood Office

JackMan

I just had another thought on this. What I'm actually trying to do is trigger a Prop-1 from another Prop-1. Both have independent 9VDC power supplies. When Prop-1 no.2 is powered up (it will be normally off) I need it to activate a trigger on Prop-1 no. 1. I have a sequence of code on Prop-1 no. 1 that will execute when a trigger on P6 is active and be bypassed when it's not. When that sequence reaches a certain point I need Prop-1 no. 1 to trigger Prop-1 no. 2. Can I connect the ground terminals of both Prop-1's together and use an OUT terminal from Prop-1 no.2 to trigger P6.W (setup jumper UP) on Prop-1 no.1? Then do the same to send a trigger back to Prop-1 no.2
I'm making this sound more complicated than it is, hopefully you get my idea.

JonnyMac

Yes, connecting the GND terminals together and using OUTx on Prop#1 to pull an input on Prop#2 low is the best idea.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Great, that's what I'll do. Thanks for the help and Happy New Year!  ;D

JackMan

Well, I'm not exactly sure why, but that didn't work. It sure sounded good but with the GND's tied together, an OUTx from one Prop-1 to P6.W on the second Prop-1 (setup jumper UP) causes a trigger immediately on power up before the code executes. 9v in, switch position 2. A meter check from Vss to OUTx confirms 9v on power up. The weird thing is when I remove the common GND between the two controllers the voltage drops to about 6.5v between Vss and OUTx. Somehow the ground is back-feeding. No big deal, I'll just use relays, I know that'll work. 

JonnyMac

Which OUTx terminal are you using on the master Prop-1?  If OUT6 or OUT7 and the SETUP jumper is in the UP position you'll get a hard output from the OUTx terminal on power-up.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

I was using OUT5. I've done a few more bench tests using N.O. switches as triggers on P6.W/R and P7.W/R (setup jumper DN) and I'm having a problem getting the second trigger in my code sequence to work. I'm using IF...THEN for the triggers but the second one which is near the end of the sequence has no effect no matter if the switch is open or closed. I've tried using P6 and P7 as two trigger inputs and I've tried using just each one in the code. I get the same result either way, the IF...THEN toward the end of the code does nothing. I'm obviously doing something wrong.  ???

JonnyMac

Why don't you post you code -- there could be a sneaky error giving you trouble.  Using stock IF-THEN checks on IO pins is not generally recommended; inputs should always be debounced.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

My Bad. I had a PAUSE value higher than 65535 following that second IF...THEN and the controller just skipped it. I broke down the time into several consecutive PAUSE's and everything works fine. I had thought that CHECK SYNTAX would have caught it but I guess it doesn't catch every stupid error.  As I mentioned before, I have a lot to learn. Thanks for the help.  ;D

JonnyMac

The syntax check will only find bad syntax, not bad logic.  The compiler truncates large values to 16-bits because to do otherwise could restrict a lot of common programming practices.
Jon McPhalen
EFX-TEK Hollywood Office