I can't get a test to work on my prop 1 trainer. The runway prop 1 trainer test works fine when I load it though. Below is the program created by vixen, is there anything obviously wrong?
'
' Source material updated 15 AUG 2012 by EFX-TEK
'
' File...... testing 1.bs1
' Purpose...
' Author....
' E-mail....
' Created... 31 AUG 2012 - Generated by Vixen Prop-1 Sequencer Plug-in
' Updated...
'
' {$STAMP BS1}
' {$PBASIC 1.0}
'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
'
' Triggered, table-drive sequencer capable of driving six control outputs.
' P6 is used as the trigger input, P7 is used for audio start when that
' option has been enabled.
'
' Note: When using the AP-16+ or AP-8 in serial mode you must replace the
' ULN2803 with ULN2003, or clip pin 1 of the ULN2803 for audio start
' on P7.
'
' Note: When use active-high input (PIR, etc) the P6 SETUP jumper should
' be in the DN position and the input is between P6.R (red) and
' P6.W (white). When an active-low (open-collector, NPN) input is
' used the ULN pin should be clipped and the P6 SETUP jumper is
' in the UP position. For active-low the connection is between
' P6.B (black, ground) and P6.W (white, signal).
' -----[ Revision History ]------------------------------------------------
' -----[ I/O Definitions ]-------------------------------------------------
SYMBOL AudioStart = 7 ' SETUP = out
SYMBOL Trigger = PIN6 ' SETUP = (see above)
' -----[ Constants ]-------------------------------------------------------
SYMBOL Baud = OT2400 ' for serial control
SYMBOL IsActive = 1
SYMBOL IsNotActive = 0
SYMBOL IsOn = 1
SYMBOL IsOff = 0
SYMBOL EventDelay = 250
' -----[ Variables ]-------------------------------------------------------
SYMBOL showBits = B0 ' output + control bits
SYMBOL endOfShow = BIT7 ' 1 = stop when timer done
SYMBOL timer = B2 ' for timing
SYMBOL pntr = B3 ' step pointer
' -----[ Initialization ]--------------------------------------------------
Reset:
PINS = %00000000 ' clear pins
DIRS = %00111111 ' P0..P5 are outputs
Audio_Reset:
' no audio device selected
PAUSE 30000 ' PIR warm-up / reset delay
' -----[ Program Code ]----------------------------------------------------
Main:
timer = 0
Check_Trigger:
PAUSE 5
timer = timer + 5
IF Trigger = IsNotActive THEN Main ' wait for trigger
IF timer < 100 THEN Check_Trigger ' debounce 100ms
Reset_Show:
pntr = 0 ' point to start of show
Start_Audio:
' no audio device selected
Play_Show:
READ pntr, showBits ' get step
PINS = showBits & %00111111 ' update outputs
pntr = pntr + 1 ' point to timing
READ pntr, timer ' read it
pntr = pntr + 1 ' point to next step
Step_Timing:
IF timer = 0 THEN Next_Step ' timer expired?
PAUSE EventDelay ' no, time on "tic"
timer = timer - 1 ' decrement timer
GOTO Step_Timing ' check again
Next_Step:
INPUT AudioStart ' release (if used)
IF endofShow = IsOn THEN Reset ' done?
GOTO Play_Show ' keep going
' -----[ Subroutines ]-----------------------------------------------------
' -----[ EEPROM Data ]-----------------------------------------------------
Show_Data:
' +------------ end of show bit
' |
' | +---------- P5 / OUT5
' | |+--------- P4 / OUT4
' | ||+-------- P3 / OUT3
' | |||+------- P2 / OUT2
' | ||||+------ P1 / OUT1
' | |||||+----- P0 / OUT0
' | ||||||
' | |||||| +-- timing multiplier (1 to 255)
' | |||||| |
EEPROM (%00000001, 4)
EEPROM (%00000010, 4)
EEPROM (%00000100, 4)
EEPROM (%00001000, 4)
EEPROM (%00010000, 4)
EEPROM (%00100000, 4)
EEPROM (%00010000, 4)
EEPROM (%00001000, 4)
EEPROM (%00000100, 4)
EEPROM (%00000010, 4)
EEPROM (%00000001, 4)
EEPROM (%10000000, 4)
You'll notice that after the Audio_Reset section there is this line:
PAUSE 30000 ' PIR warm-up / reset delay
This serves two purposes: 1) on power-up it lets the PIR (if you're using one) warm up so that it can trigger properly and, 2) it provides a 30-second delay between one run and the next possible trigger.
After downloading, simply wait 30s and then press the trigger button. You can remove this, but keep in mind what it is for if you do.
If you want to temporarily disable this feature you can "comment out" the line by putting an apostrophe in front of it; when you do, that line will turn green -- like this:
' PAUSE 30000 ' PIR warm-up / reset delay
(note the apostrophe at the start of the line)
When you're happy with the sequence, remove the apostrophe to get your warm-up/delay back.
Thanks. I'll try tomorrow, I'm working now.
okay, I'm trying to move servo's. Is the intensity suppose to do this? I can't get more than a twitch for movement. I am using a usb to serial cable with your prop1 attachment at the prop1 end (Com 3). In vixen, it's set to generic serial cable, Com 4. Is that wrong. I can still load created programs.
You cannot create a servo program for the Prop-1 using Vixen.
If you want to know how to move servos in code with the Prop-1, please make a post in the Prop-1 section. If you search there, you'll see the topic has bee covered many times. Let me just say up front that it is not easy and that the very small memory of the Prop-1 is a severe limitation (you can only squeeze so much out of a $40 controller).
If you're trying to move servos from a live Vixen program (not a downloaded program) then start a new thread. We have done that in a VERY LIMITED way. I can show you how and will do so in another thread. Note that you cannot do this through the programming connection.
If advanced servo motion and stand-alone playback is what you want, especially coordinated with other outputs (digital, dimmer, other servos), the HC-8+ is the only way to go. Yes, it costs more. What you get with it, however, is a performance upgrade better that 10,000 fold over the Prop-1.
What those using the HC-8+ are doing is creating advanced programs in Vixen, exporting them, then playing them back from a microSD card using our microSD add-on board. This means that the HC-8+ memory is not involved with show storage, allowing for very long, very complex shows. And as the HC-8+ has multiple inputs, you can trigger different shows as required. Need more than 8 channels? No problem, the HC-8+ has built-in networking (RS-485) that enables you to connect a master board to one or several slave boards.
This thread is locked as the intent of the topic has changed.