May 18, 2024, 03:11:25 AM

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.


Converting a Robo-Ware program to an HC-8+

Started by JackMan, June 22, 2012, 08:56:22 PM

Previous topic - Next topic

bsnut

Jack,

I have been following your project and this thread and noiced that your goal is to use
the Mini-SSC as much as posible. So, I have some suggestions for you.

QuoteWell, my first choice would be to capture the stream and hope for the best
Not a bad idea, it's worth a try.

QuoteI know re-writing this is gonna take me forever
If you know the timing that is between each of the servo movements and the positions. I
don't think it will take you long as it did the first time you wrote it. What I mean is,
if the "WAIT 1, 677" command is in ms and the "MOVE 1, 1200" command is the servo# and
position then you can try Jon's pursing program that he did for you that uses these commands.
Or, you can try a all new program for the HC-8+ which uses the code by Scott Edwards
Mini-SSC docs formatted in Spin so you can use the Mini-SSC and use the timing from the Robo-ware scripts. This way you don't have re-wire the servos on to the HC-8+.

Vixen is a great choice if you can take the Robo-ware program scripts and manually input
them into to Vixen. But, I have this feeling that you won't be able to use the Mini-SSC's
and you will need two HC-8+ to handle the 10 servos that you have. But, I will will let Jon
answer that question for you.

BTW, Have great 4th of July and hope you are able to see some Fireworks.
William Stefan
The Basic Stamp Nut

JonnyMac

I am still at a point where I don't know how to write a reliable data capture utility.  In the hopes that I can convince Jack to make the move to Vixen I've attached the following program which will echo data streamed from Vixen at 57.6K baud (via the Prop-Plug) to the Mini-SSC protocol at 9600 baud out the SERIAL header.

There is a constant in the program called ENABLES that selects which channels will be echoed to the Mini-SSCs (keep in mind that channel 1 is stored in BIT0 of ENABLES).  Vixen will send all 16 channels; this constant allows us to ignore those that are not used on the Mini-SSCs.

If nothing else this will verify that we can transmit valid Mini-SSC data from the SERIAL header.  The bonus for me is if Jack likes this enough to rebuild his show in Vixen.  ;D
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

OK, I'm leaning your way on this  :o  What version of Vixen do I need? I tried the link from your post in the Library section for V 2.5.0.8,  no luck. It only downloads part of the way and stops. It says download complete but it isn't. Can I use my data for each channel from Robo-Ware to enter the values into Vixen?

JonnyMac

July 05, 2012, 06:38:58 PM #33 Last Edit: July 15, 2012, 11:52:17 AM by JonnyMac
I also downloaded the latest "official" version (2.1.10) and find it works with everything. 

-- http://www.vixenlights.com/releases/Vixen%202.1.1.0.zip

Vixen doesn't have an installer; simply unzip the file (which will create a Vixen folder) to the folder of your choice (I have one called Animatronics).

I've attached the Add-In that exports Vixen data to a binary file; unzip this to the Vixen AddIns folder and it will show up in the Add-Ins menu.  I've had a rough couple days on another Propeller project; after a bit of reset I will clean-up our Vixen section, especially in light of what we can do now.

BTW... I had sent and email to the guy who writes Robo-Ware asking him about export.  He said that the software doesn't have such a feature and that they don't do PC work; which sounded to me like getting it added was not going to happen.

Note: Attachment moved to Vixen forum
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

OK, got Vixen downloaded and installed. I'm lost at this point, what now? A couple of posts back you attached a file
mini-ssc_16.vix  Where does this need to go and what do I do with it?

One other problem. When I start Vixen I get an error message:
"Error when loading UI plugin from LedTriksUI:
Exception has been thrown by the target of an invocation."

If I click OK on this it seems like Vixen does load but I just have a blank screen with a toolbar at the top.

JonnyMac

Jack,

Make sure you have the latest version of the .NET framework installed -- this is probably the cause of the LedTriks error though that doesn't affect us.

Use Sequence -> Open and Event Sequence to open the .vix file (you would normally put this in the Vixen Sequences folder).  Vixen is an MDI program; let me suggest you use the maximize button on the sequence window; this will cause it to fill the client area and everything will be easier to see. 
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Yep, .NET Framework 2.0   I played around with Vixen for awhile after my last post and figured out how to create an event sequence. I created one with 16 channels and named the channels to match my Robo-Ware program. After I did this and saved it I realized what the .vix file was that you posted.  ::) Still a bit confused though, not sure how to go about transferring the data from Robo-Ware to this event sequence in Vixen. The way it looks to me I'll have to enter a bazillion values in the little squares for the speed and position of the servos. If it takes 10 frames for one of the servo movements I'll have to divide the the total position change by 10 and enter 10 different start/end positions (10 squares) using the Partial Ramp On feature? I hope there's an easier way  :o

JonnyMac

A couple things since you made your own sequence: Make sure that you open the sequence properties dialog and set the maximum level to 254 and the event period to 50ms.

Note the buttons I circled in red in the image -- these are the most useful.  All of them work by drag selecting a number of cells -- usually on the the same line (channel).  When you enter values it is in percentage from 0 to 100%.  When the values are output your 100% will be 254 that corresponds with the values expected by the mini-ssc.

Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Yeah, I had the sequence settings already changed. I'm a little confused about how to convert the servo positions using 0-100%.
I see how to drag select the number of cells but converting to a percentage is not going to be exact (each step in percentage = a 2.54 change in servo position?) Am I looking at this right? I also can't figure out how to set the total event time to where I need it. When I change the time and save it, the graph remains at 1m.

JonnyMac

Keep in mind that 0% is going to be one side of the servo movement, 50% in the middle, and 100% the fully the other direction. If you need, I can update your HC-8+ program with a bit map that allows you to reverse servo direction from the command -- that might be a good feature to add, anyway.

Event Time -- which is set in the Sequence > Settings dialog, is the time between frames (updates to the servo driver); keep your event time at 50ms to match what you were doing with Robo-Ware.  The entire program is called Sequence Time which is set in a toolbar at the top of the screen.  When you change it you'll see a dialog that tells you it was changed.  The screen may not change much, but if you use the scrollbar on the bottom you'll see that it has.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

I've got the event time at 50ms, no problem. I can't seem to make a change in the Sequence Time. I can change it in the dialog box but it doesn't do anything, the graph remains at 1m when you scroll across.

JonnyMac

Did you try restarting the program? .NET stuff is finicky, especially with the modularity KC allows in the program -- though the openness is a real blessing when everything is working correctly.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

July 07, 2012, 02:41:14 PM #42 Last Edit: July 07, 2012, 03:06:38 PM by JackMan
Yeah, several times. Not sure if I'm missing something or if it's just being a PITA.

Update: OK, got it. I added the sound track and it automatically changed the sequence time to match.
Another ?  Do I need to enter a value for every frame when the servo is "waiting"? For example; channel 3 has to wait 488 frames before it moves for the first time, do I need to enter the "home" servo position in those 488 frames? 

JonnyMac

It will output whats in the frame so you'll need to select the cells and enter a value.

One of the cool things that Vixen offers is the ability to grab a bunch of frames and save it as a routine.  For your mouth you may find this especially useful for repeated words.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

OK, now I have steam dribbling from my ears.  :o  Spent 4 hrs last night entering the data for one servo, and this was one of the easy channels, about 1 page of data. One of the jaw servos is 20 pages long, yikes!