FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Where are the motor/servo definitions stored?

This is a question for NI, as it involved LVLM internals..

I've been using LabVIEW in FIRST for about 4 years now and consider myself fairly experienced.

Because I also coach FRC, I prefer to run LVLM using the more mainstream LabVIEW environment (Tools/ Choose Environment/ LabVIEW) rather than the more restrictive LVLM environment.

So we created a regular LabVIEW project under /My Documents/LabVIEW Data/FTC 2013, and copy/pasted our blank LVLM Teleop template.vi into that folder.  (This is how we seed our project with a valid template.)

Initially, when openning the template, Labview companins that it can't find the original .lvrbt project, but once we go in and update any motor assignments, this seems to remove the dependance on the original LVLM project file.

To do this we strip out the existing "template" motor references and use the "configure" option in the "motor" input pulldown to invoke the Schematic Editor to create new ones.

Everything seems to work fine at this point and we can continue to make chanes to the schematic assignments.  The robot runs as expected.

However, the problem is that the Motor/Servo constants don't seem to follow the newly created project when it's transfered or backed up.

Why do I say this???

Well, the S/W team went ahead and created all the motor/servo constants on our development PC, but when I coppied the entire project folder to the Laptop we use for field testing, it looks like the schematic assignments didn't transfer.

If we just pull up the Teleop code, the Motor/Servo names are correct in the VI, but if you try to change the motor selection, an outdated legacy list of motors and servos show up. (ones that already existed on the laptop)

So the selections that reside in the VI are correct, but the live list of available selections is being pulled from somewhere else.

How can I lock-in the list of available motor/servo names so that they carry with the rest of the VI's in the project (withjout needing to use the .lvrbt file and environment).

I'd create my own Typedefs but I can't figure out how to get the polymorphic motor VIs to accept them.

Phil.

Get a life? This IS my life!
0 Kudos
Message 1 of 5
(7,008 Views)

OK, so an update...

When you click the Motor configure button using the LVLM environment, it stores the Schematic information in a file in the Project folder.

However,

When you click the Motor configure button using the standard LabVIEW Environment, apparently it stores the Schematic information in a file called:

\Users\youid\AppData\Local\robo_schema.bin

So on the surface it would appear that Standard Labview can't keep multiple project schema's.

Although there must be some way...

I tried copying the file to project folder, or adding it to the project list... but to no avail.

Any suggestions?

Phil.

Get a life? This IS my life!
0 Kudos
Message 2 of 5
(3,948 Views)

This is untested but what about something like this:

motor selection alternative.png

It is not as clean as having the schematic editor work as intended and doesn't auto update but it might do the trick.

(1st digit can be 1-4 and signifies the NXT port the controller chain is plugged into. 2nd digit can be 1-4 and signifies the controller's position in the chain.  3rd digit can be 1 or 2 and signifies the motor port on the controller, 4th is 0 or 1 and signifies the motor's direction.)

0 Kudos
Message 3 of 5
(3,948 Views)

Hi

That's an excellent suggestion.  I'll try it out. 

I know how those integers work, and I have created my own strict typedefs for motors and servos in the past.

But I hadn't thought of using the Bundle VI to make the conversion.

This would seem to give the best "Auto Update" on change behavior. as well.

Side note:  I find that even making changes in the schematic editor are hit & miss when it comes to propagating throught the code. 

This seems especially obvious with things like motor inversions.

If the program is built with left and right motors using no inversions, and then one motor is inverted after testing, then my experience is that the change isn't picked up unless you delete and re insert the motor selection on the VI.

Thanks for the suggestion.

Phil.

Get a life? This IS my life!
0 Kudos
Message 4 of 5
(3,948 Views)

Hi Phil,

Looks like you've already figured most of it out, but maybe I can help shed some light.

If a vi is part of an .lvrbt, it will look for the robo_schema.bin file that is also part of that lvrbt. If a vi is stand-alone, or not part of an lvrbt, it will look for a global robo_schema.bin. This means motor definitions will only "stick" to the vi if it is an lvrbt member.

If you would like to use the regular labview project window, I would recommend trying something like this.

1. Create a standard lvrbt that you would like to use as your template. Make sure you open the schematic editor and hit save so that the robo_schema.bin gets created and added to the library.

2. Close the Robot Poject center.

3. Create a new empty lv project.

4. Right click on the "My Computer" and select add file. Navigate to your lvrbt and hit ok.

This will give a labview project that contains the lvrbt which contains your vis. If you move the entire project to another machine, motor definitions will transfer as expected. If you want to make a copy of the project local to your machine, use the project save as functionality instead of copying the files to avoid linking issues.

If you click on a motor "Configure..." option, it will open up both the RobotProjectCenter and the SchematicEditor, but you should be able to just close the project center when you're done editing motors.

You may run into some issues.... you're probably the first person to try this usecase but I'd be interested to hear how it goes and what you run into.

-Ethan

0 Kudos
Message 5 of 5
(3,948 Views)