FIRST Tech Challenge Discussions

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Code Generation motor issue

Résolu !
Accéder à la solution

With the latest software (LVLM 2012 sp1f4 & MCT 20130909) I created a new project, selected the FTC Arm and Grabber template.  Checked the schematic editor to confirm the motors were named.  Went into the remote control editor and clicked generate code.  After the code is generated the VI is not runnable.  All the motor constants are listed as “Lego Port x” and none of the constant pull downs list the DC motors are not listed.  The move DC Motor has a Lego motor control VI at its core.  It looks like the HiTechnic pallets aren’t installed. Are there separate installs or should the MCT install everything?  The MCT functions pallete is installed.

Thanks,

-Steve

FTC generated motor constants.JPG

0 Compliments
Message 1 sur 28
15 360 Visites

We had a few issues with the MCT that was posted on FTC Kick Off.We posted a fix on 9/9. Try downloading a freash MCT and doing an install and restarting. Is the "Code Generation" button have double test printed on it? This is one symptom of the install error.

http://joule.ni.com/nidu/cds/view/p/id/4331/lang/en

0 Compliments
Message 2 sur 28
5 987 Visites

So we did download early a few weeks ago and we did have the double image generate code button.  With three new / fresh systems (no previouse LV installed) we downloaded all the latest code Thursday the 19th which has the same file as the link above and we have the issue described above.  We have a clean generate code button, it generates and opens a LabVIEW VI but there are no tetrix motor constants or VIs.

0 Compliments
Message 3 sur 28
5 987 Visites

Hi Steve,

It looks like you don't have any HiTechnic motors configured in the Schematic Editor. The default Schematic only includes the Lego Motors. Please try configuring the Tetrix Motors in the schematic editor and then referencing them from the Joystick application or the block diagram motor constants.

Thanks!

0 Compliments
Message 4 sur 28
5 987 Visites

I do have HiTechnic motors on the schematic and they are referenced on the joystick application.  I actually did a test starting with the FTC arm & grabber template and it does the same thing.  I have put a zip file of the project on the NI/Incoming ftp site named: FTC Arm-Gripper.zip.

FTC Schematic.JPG

0 Compliments
Message 5 sur 28
5 987 Visites

Steve, if you pull down on one of the generated motor constants and select the "Configure..." option, does it bring up the correct schematic?

0 Compliments
Message 6 sur 28
5 987 Visites

Yes.  Oddly enough after I choose configure, look at the schematic then go back to the VI I can see the schematic motor names in the constant pulldown now.  When I select the right motor the correct drive subVI is selected and it looks like things should work. 

So now I would assume that somehow when the generate code button is pressed the schematic isn't getting referenced correctly?  On one of my test projects I started from scratch, created the schematic with HiTechnic controller and motors then saved.  Then created a remote control scheme referencing those motors and saved.  Then pressed generate code and it referenced lego motors instead of the schematic motors.

Thanks,

-Steve

0 Compliments
Message 7 sur 28
5 987 Visites

Yes.. it sounds like there was an error reading the schematic file when you generated code and the system fell back on the default schematic. I will try and look into what might have caused this. Glad you have things working somewhat. Let me know if the issue is reproducible or not.

0 Compliments
Message 8 sur 28
5 987 Visites

It is very repeatable, it happens every time for me.  I just created a new project, selected FTC Arm & Grabber template.  Open the schematic to make sure all motors are there, making no changes then close.  Open the remote control window to make sure correct motors are referenced, making no changes then generating code.  Every time starting with FTC arm & grabber or from scratch the generated VI references lego motors.

What I just noticed is while the VI has just been generated and has not been saved yet, I can press configure and it opens the correct schematic but I still cannot see the correct motor names in the pulldown.  When I close and save the VI then re-open it I now see the correct motors in the pulldown and can change them from lego to the schematic motors.

-Steve

0 Compliments
Message 9 sur 28
5 987 Visites

Hey Steve,

What kind of computer and version of Windows are you using?

0 Compliments
Message 10 sur 28
5 987 Visites