![]() |
New Programming Core needs help with simple motor control
We have created the simple motor control program found on the NI website. We can successfully deploy the code to the CRIO via the run button in Labview. When changing the value of the output the motor does nothing. We have two Jaguar motor controllers and we have tried both but neither work. The Jaguar motor controllers have the yellow light blinking on them. This indicates as far as I can tell that they are not initialized. I have checked the PWM cables and changed them out and switched them around to make sure they are plugged in the right way. No change. I have changed the digital side car. No change. I have changed the NI 9403 Module. No Change. I have changed the cable between the NI 9403 and the digital side care. No change. We have a light plugged into the RSL of the digital side car, I don't know if it should light up when the code is deployed but it is not. The 5v led is on steady. The BAT led barely lights up, but it is blinking. An extremely small led beside the RSL pins barely lights up, but it is blinking. Thanks in advance for your help.
![]() ![]() ![]() ![]() |
Re: New Programming Core needs help with simple motor control
Quote:
EDIT: Images just appeared up in your post and it looks like you have at least attempted to make this connection. Make sure that the breaker in place is functional and that the wire on each end of the connection is seated in the terminal and the terminal is not grabbing onto insulation. |
Re: New Programming Core needs help with simple motor control
What gauge is the wire to the sidecar from the distribution board? I looks like 18 from the picture and it needs to be at least 14.
also, use 30 amp breaker |
Re: New Programming Core needs help with simple motor control
Quote:
Try checking the Sidecar for metal swarf that could be shorting a few pins. If all else fails, try replacing it with a known working one and see if that helps. When everything is connected properly, all 3 lights should be glowing bright. |
Re: New Programming Core needs help with simple motor control
Quote:
|
Re: New Programming Core needs help with simple motor control
Your Digital Sidecar is not getting 12 volts on its power input.
Perhaps one of the wires into the Wago connection on the Power Distribution Board isn't stripped long enough and the Wago is clamping on the insulation instead of the conductor. Perhaps the 20 Amp breaker on that circuit is faulty. Use a meter to determine where the 12 volt power is getting lost. |
Re: New Programming Core needs help with simple motor control
Ok, so before we left the meeting today we built an entirely new system for me to test at home. This has an entirely new Crio and Digital Side car, but uses Victor 888 controllers. It seems that there might have been a problem with power on the previous setup, but I never seen the replies before I left school. After I seen the replies and I powered this setup at home and all the lights lit up on the digital side car I figured it would be a cake walk.
I reimaged the Crio and ran the simple motor control but no luck. I did change the motor open to victor but it is the same program as above. I am posting new pics of this setup to make sure that everything is set up correctly. Voltages seem to be proper on all components. To be clear though with this program I should be able to click the run button, it will upload the program to the Crio and then I should be able to manipulate the output control and the motor should move. At 1 the motor should be at full output. To be clear the victor is blinking yellow, no pwm signal. With two completely different setups not working it makes me think that there is something I am missing about the programming. Is this program correct? Do I need to do anything other than click run, let it upload and change the output control? Thanks again for everyone's help. ![]() ![]() ![]() ![]() |
Re: New Programming Core needs help with simple motor control
The program you posted may work, but is not the officially supported way of programming the cRIO (last I heard). If you have been able to run the code, does the Motor Output indicator change in response to the control value? Since the WPI Robotics libraries are installed, there should be a cRIO project option in the Project wizard. Running the program from a normal VI and with inputs from a normal VI control may work correctly, but it has been too long for me to remember definitively. I would suggest creating the cRIO project, including the appropriate code there, and downloading and running the code to see if it works.
Posting as much information as you can (pictures included) will help speed up the process of figuring out what is not working. PM me if you have any questions about this post. EDIT: Just making sure, you are enabling the Driver Station before you test the motor, right? (no offense intended at all) |
Re: New Programming Core needs help with simple motor control
As mentioned above, you should either run the template code or an example. All of these have the framework code for the safety protocol.
Also, that sure looks like a 9472 in slot 1 of the cRIO. It shouldn't stop the motors from working, but neither it nor the intended analog module can work if they are swapped. Greg McKaskle |
Re: New Programming Core needs help with simple motor control
Ok, so I have created a project that has the template code. I have followed the instructions found here. https://decibel.ni.com/content/docs/DOC-14723 In addition to completing the simple motor control vi and running it. I have also packaged the entire template project and deployed it to the Crio. I then open up the driver station that installs with the update and attempt to run the code in test mode and manually changing values.
The problem is that the Victor 888's are not receiving pwm signal (yellow blinking light). I have done all these same things to the other test rig with the jaguars and its the same problem, no pwm signal (yellow blinking light). Both rigs share none of the same parts and were wired by the same people who wired the robot last year. (In the case of the jaguar robot it was the test rig from last year). All parts have worked before. (In the case of the current rig I am working with that has the Victor 888's, it has been as soon as a few weeks ago). Again I am completely new to robotics but not to programming or computers. There has to be some step I am missing. I would think though that if I deployed the Template code to the robot (I used the deploy tutorial, I built the code and deployed as startup) that when it prompts to reboot and after it finishes the reboot that RSL would light up in the disabled mode. Nothing lights up. In fact I have yet to do anything that has enabled me to get the RSL to light up. Attached is pics of what I have been doing. Also I removed the 9472 and Ill figure out what slot it needs to be in later. ![]() ![]() ![]() ![]() |
Re: New Programming Core needs help with simple motor control
Instead of using the Simple Motor Control example, try loading a new robot project on it. On the welcome screen of LabVIEW, click on the create new FRC robot project button. From there, enter your correct IP address, and see if that code will run.
|
Re: New Programming Core needs help with simple motor control
Quote:
Now when I tried to deploy the template code (unchanged other than changing the jaguar to victor in the begin vi) I complied the code and deployed as start up. When I did that I ran the driver station as illustrated in the pic in the post above. If there is something else I am supposed to do then this may be the step I am missing. I am very new to robotics. Our team is on their 5th season but our programmer left last year and this is my first year on the team. I know programming and computers, but this still has a learning curve. Thanks again for your help. |
Re: New Programming Core needs help with simple motor control
Quote:
|
Re: New Programming Core needs help with simple motor control
I think I may see the problem. Instead of clicking "Run" from the Simple Motor Control.vi", Open up the "Robot Main.vi" and click "Run Continuously".
Also, try runing your code with Teleoperated selected on the Driver Station, not Test. The Test function will return values to the test screen, while Teleoperated should control it normally. |
Re: New Programming Core needs help with simple motor control
Quote:
|
Re: New Programming Core needs help with simple motor control
Quote:
I have tried both run and run continuously for the simple motor control. As for the Robot Main.vi I have not ran the code within Labview. The reason is because I can not run the code within labview and open up the driver station at the same time. I therefore compiled the code deployed the code to the robot to run on start up and then open the driver station. |
Re: New Programming Core needs help with simple motor control
The Simple Motor VI looks fine for verifying things. It includes the Start Communications icon to connect to the DS. It has a loop in it, so no need to continuous run.
If your RSL is not blinking, is the small LED on the digital breakout board blinking? The LED helps distinguish between bad signal or power to the big light or an issue with the signal to the breakout board. One of the things that hasn't been discussed is the ribbon cable. I've heard of bad cables and backwards cables over the last few years. Can you try another? Greg McKaskle |
Re: New Programming Core needs help with simple motor control
Quote:
I was wondering though. Does it matter if the crio that I am using is the longer 16 bit version or the shorter 32 bit version? Also does it matter if I am using a crossover cable? I know what they are since I have wired both CAT 5 and CAT 6 but I don't know if the one I am using is crossover or not without checking the wires and looking up the colors for crossover. I would think as long as I can deploy code to the crio the network cable is fine. If I remember my networking class right most NICs can actually detect if it needs the crossover and compensate anyway. Thanks again for yall's help. P.S. If anyone thinks I should try this with a different programming language and has some java or c++ code I can try out I can see if I can get a copy of those compilers and try to get this running on a different programming language. I know both decent enough to work with it. I just want to see this thing turn a motor and then I can take the next step. ![]() |
Re: New Programming Core needs help with simple motor control
Also above it looks like 1 and 2 are on, but its actually just 1 and a reflection off the plastic.
|
Re: New Programming Core needs help with simple motor control
Also I am reformatting my CRIO for like the 10th time just to make sure something isn't wrong there and I noticed with this 32 bit 4 slot crio that there are no physical dip switches. Everytime I reformat the CRIO I see the dip switch positions and the console out dip switch is flipped. I have no idea what it does, but I do click on it on the FRC image tool and turn it off before formatting. It does somehow turn itself back on the next time I try formatting though.
![]() |
Re: New Programming Core needs help with simple motor control
Just reimaged it with another computer and deployed the project template code. The only change in the code was in the begin.vi where the open motor is set to victor instead of jaguar. No PWM signal, no RSL signal.
![]() |
Re: New Programming Core needs help with simple motor control
I just noticed after reading what other problems people are having that our driver station is reading 0 Volts. This might be of some significance as to what the problem is.
|
Re: New Programming Core needs help with simple motor control
Quote:
None of the other things you mentioned would matter. Quote:
|
Re: New Programming Core needs help with simple motor control
Quote:
Quote:
If you're doing a Compile followed by a Run as Startup, then you're not running the example. You're running Robot Main, which calls all the other Team Code. |
Re: New Programming Core needs help with simple motor control
Quote:
|
Re: New Programming Core needs help with simple motor control
The battery voltage is measured using the first slot and the analog module. Until that is installed, the DS will not know the voltage.
The bigger cRIO and smaller cRIO are not that different. The processor in both is a 32 bit Freescale processor. The performance is slightly different due to cache size, the RAM was increased, and physical elements like the power connector, second enet port, and dip switches were removed. The imaging tool can read the dip switches just to help diagnose broken ones -- happens more often than you'd think. For the 4-slot, it can also set them. The one begin set determines whether the serial port is used to output console print statements or used to communicate with another serial device, like a sensor. As Alan said, simply pushing run on the VI will be the faster way to run your VI. Be sure that the VI contains the safety info. If you run a lower level VI, it will indeed run, but without established communications with the driver station, the outputs will be disabled and that safety feature can cause confusion. There should be no issue running DS and any other development environment or tool. If you get an error, please post it so I can better understand what is going on. To make further progress on getting your motors to run, I'm with Joe. Focus on getting the RSL LED to light up or blink. I'd start with the cable, but it could be the digital breakout board. If that doesn't fix it, work backwards and try another digital module. Also, remove the module in the cRIO and inspect that the backplane pins aren't bent and don't have debris shorting them. Also make sure that the module is fully inserted and the side clips engage. The imaging tool shows that it is recognized, so I doubt that there is an issue with engagement or pins. Greg McKaskle |
Re: New Programming Core needs help with simple motor control
Just wanted to let everyone know that the problem was the digital sidecar. Here is what happened. I had no RSL light for the test robot that we had set up. After verifying that the code was right I started swapping parts out. When I swapped out the digital sidecar I also swapped the power for it. The power cable was not properly installed so the sidecar did not get enough voltage. The test rig that I brought home to work on had the digital sidecar that I took off the test robot. That sidecar is bad and did not work. When I got back to school and worked on the test robot I simply adjusted the power cable in the breaker panel and the sidecar started working. I also replaced the side car on the test rig and it too started working. Very unlikely circumstances lead to a very troubling problem. Thanks to everyone who helped figure it out.
|
Re: New Programming Core needs help with simple motor control
Congrats, and thanks for the update.
Greg McKaskle |
| All times are GMT -5. The time now is 20:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi