Log in

View Full Version : Programming issues


jeremy5561
04-02-2014, 21:41
I'm having a very weird programming issue. We're trying to add a compressor to the robot.

http://i.imgur.com/caAmo2B.png
http://i.imgur.com/yWJXS5Z.png

The spike is connected to the digital sidecar on relay 1, and I confirm the relay is working (because I wrote a very simple test program and all it does is open relay 1 and set it to run forward).

Additionally, we have the pressure switch that is supposed to open at 115 psi connected to Digital I/O 1 on the digital sidecar. The two outer pins of the DIO is connected to the two terminals of the pressure switch. The problem is when the pressure rises to 125psi (beyond 115) the pump keeps running. To diagnose the problem I tried to read the DIO directly and send it to the dashboard but adding the DIO to the code stops the code from working. Simply adding the DIO stops the compressor from running.

http://i.imgur.com/Qd153yO.png

Additionally sometimes when teleop is started, the motors will sometime randomly jitter, turning the wheel a tiny amount. Very weird. The drive system seems to respond correctly though. The rangefinder attached to the analog module seems to work correctly through all this.

Any idea what could have gone wrong? I can't figure out what could possibly be wrong. Could this be a bad sidecar? I remember one year we had a problem like this because the cable was incorrectly assembled, but the cable seems ok this time. Has anyone had this problem before?

Joe Ross
04-02-2014, 23:34
To diagnose the problem I tried to read the DIO directly and send it to the dashboard but adding the DIO to the code stops the code from working. Simply adding the DIO stops the compressor from running.
When you did this, you tried to allocate DIO 1 twice, which isn't allowed.

Additionally sometimes when teleop is started, the motors will sometime randomly jitter, turning the wheel a tiny amount. Very weird. The drive system seems to respond correctly though. The rangefinder attached to the analog module seems to work correctly through all this.

Any idea what could have gone wrong? I can't figure out what could possibly be wrong. Could this be a bad sidecar? I remember one year we had a problem like this because the cable was incorrectly assembled, but the cable seems ok this time. Has anyone had this problem before?

If you remove the DB-37 cable from the digital sidecar, are all 3 power LEDs brightly lit?

Alan Anderson
05-02-2014, 08:12
If you want to read the state of the pressure switch, you can use Test mode.

If you unplug the pressure switch from the DIO pins, does the compressor stop?

Chadfrom308
05-02-2014, 08:47
I would make sure you have the correct DIO Switches and Pressure switches wired in both labview and on the robot.

jeremy5561
05-02-2014, 14:25
I will check today. Is disconnecting the switch supposed to stop the pump? I thought the switch closes when the pressure is high.

Alan Anderson
05-02-2014, 14:34
I will check today. Is disconnecting the switch supposed to stop the pump? I thought the switch opens when the pressure is high.

You thought correctly. The experiment is designed to show whether the code and other hardware are working, and point to the possibility that your pressure switch is faulty.

If connecting the switch makes the compressor run even when the pressure is 120 psi or greater, and disconnecting it makes the compressor stop running, then there's very likely something wrong with the switch (or with the wiring between the switch and its connector).

On the other hand, if the compressor still runs when the switch is disconnected, there is definitely something else wrong.

ROBOGIRL2781
05-02-2014, 14:43
In the periodic tasks you may want to put the compressor in an enable/disable structure.

jeremy5561
05-02-2014, 20:59
It turns out it was because I opened DIO 1 after it was already assigned to the compressor.

Also I forgot to do Compressor Start during Begin.VI.

I also discovered that the DIO returns True when the switch is open (e.g. when the switch is completely unplugged).

We have the regulator and rest of the pneumatics line working. We have the low pressure side running at 60 PSI. We have one of the Festo VPLE18 single solenoid valve, but when we try to activate it the LED turns yellow, but the valve doesn't seem to do anything.

We have the solenoid output connected to 1 and 2, SIG being connected to 2. We already tried 1 and 3 and that makes it worse (the LED doesn't turn on at all). The solenoid activates with the manual override.

In labview, we tried Solenoid Set and we tried On, Forward, and Reverse. I'm a bit confused because I thought solenoids could only go one way, and double solenoids can only go 2 ways. What does the On setting do? Why isn't the solenoid moving?

ROBOGIRL2781
05-02-2014, 21:07
In labview, we tried Solenoid Set and we tried On, Forward, and Reverse. I'm a bit confused because I thought solenoids could only go one way, and double solenoids can only go 2 ways. What does the On setting do? Why isn't the solenoid moving?

On a single solenoid you use on and off. On a double solenoid you use forward and reverse.

Alan Anderson
05-02-2014, 23:21
We have the solenoid output connected to 1 and 2, SIG being connected to 2. We already tried 1 and 3 and that makes it worse (the LED doesn't turn on at all). The solenoid activates with the manual override.

I don't understand your description of the connections. The VPLE18 is a single solenoid valve, and should only be connected to a single Solenoid Breakout channel.

On a single solenoid you use on and off. On a double solenoid you use forward and reverse.

You also can use Off on a double solenoid.