November 15, 2024, 06:51:26 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


more prop 1 questions

Started by djm902, July 28, 2009, 08:13:33 PM

Previous topic - Next topic

djm902

I have been working with the prop for a little bit now tweaking the programming to get it the way I like it,
but the other day I got it adjusted just right but now I can't seem to get it to trigger.
I am using pin 6 for the trigger and it is in the down postion
please help
thanks

JonnyMac

I'm a great programmer, not such a great mind reader!    ;D

Please post you code so I can have a look.  Also, tell me what you're using as a trigger device.
Jon McPhalen
EFX-TEK Hollywood Office

djm902

' {$STAMP BS1}
                  ' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Trigger         = PIN6                  ' SETUP = DN
SYMBOL  Solenoid        = PIN1                  ' OUT1/V+
SYMBOL  CapAudio        = PIN0                  ' white->OUT0, black->GND


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0


' -----[ Variables ]-------------------------------------------------------

SYMBOL  timer           = B2


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear all
  DIRS = %00000011                              ' set outputs

  PAUSE 1000                                    ' let CAP initialize


' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0                                     ' reset timer

Check_Trigger:
  PAUSE 5                                       ' loop pad
  timer = timer + 5 * Trigger                   ' update timer
  IF timer < 100 THEN Check_Trigger             ' wait for 0.1 sec input

  CapAudio = IsOn                               ' start audio
  PAUSE 250                                     ' hold for CAP debounce
  CapAudio = IsOff

  Solenoid = IsOn
  PAUSE 1000
  Solenoid = IsOff
  PAUSE 120000
  GOTO Main

thats the code you made for me  awhile ago just slightly adjusted.
I am using a connector with  two wires coming out of pin 6. white and red.

JonnyMac

The only problem I see in the code is:

  PAUSE 120000

... this is not possible as the maximum value in the Prop-1/2 is 65535; you need to break it into two statements:

  PAUSE 60000
  PAUSE 60000

For triggering you should be able to use a N.O. (normally open) button or switch connected between P6.W and P6.R.
Jon McPhalen
EFX-TEK Hollywood Office

djm902

ok I did what you said and adjusted the pause time from 120000 to 60000 x2.
It seems to be triggering now but out 0 is not working at all ,and this is what triggers my audio

JonnyMac

There's no reason it shouldn't work -- you could have a bad ULN.  Your program is compatible with the Prop-1 Trainer; have you tried that to see if P0 and P1 LEDs light?
Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Where are you connecting Out 0 to? One wire should be in Out0 and the other should go to V+ on the green connectors. The ULN sinks current, it doesn't supply current. (i.e. it acts as a ground not a voltage source)
Shawn
Scaring someone with a prop you built -- priceless!