Hello -
I’ve got this code which helps the drivers in aiming and shooting our “cannon”. I’m using two sensors - the Rangefinder and Potentiometer (to measure the angle of our "cannon).
Basically, I want to evaluate the distance from the wall. If it falls within the range I want, a press of the trigger on a joystick will initiate the firing code. It’ll evaluate the barrel angle, and adjust depending if it’s too high or low. Then, it waits 100ms and fires the shooter motor for 500ms at full output.
I had this working just a few days ago, now it doesn’t. When I run it normally, I’ll have the potentiometer at an angle outside what it is looking for, to test the adjustment code. If the angle is too low, our Jag flashes green, denoting that we are supplying it a positive value less than 1. Once the potentiometer reaches the angle it wants, the shooter motors fail to fire. If the potentiometer is set to an angle below what it’s looking for, our Jag flashes red, but it appears as if something is interfering with it. The orange/yellow Idle light cuts in and out. Then, the shooter motors fail to fire.
When I use the Show Execution feature in LV, I can easily follow the execution. It works flawlessly.
Any help? I’ve attatched a copy of the VI. Please note that all values are purely for testing.