Log in

View Full Version : Compressor Coding Question


team3329
06-04-2010, 10:18
Ok. I tried this compressor code however it doesn't seem to work. The only error is a watchdog error that only works when I enter this in. The Compressor Enable i put for debugging purposes if any one can help that would be great.

8982

The error when running is : I/O Unit not detected or installed properly

ps. this in a newly created project. When it was being run the labview wanted me to save changes to some vision code that I did't even touch

Mark McLeod
06-04-2010, 10:46
Code looks fine.
Do you see the relay 2 status lights on the Digital Sidecar?

How's the wiring?


Pressure switch wired to black & white (outside) wires and connected to DIO 2
Compressor spike connected to Relay 2
The Enabled check should probably be after the Start to be meaningful.

Alan Anderson
06-04-2010, 10:53
Instead of "it doesn't seem to work", can you tell us what you expect it to do, and what it does instead?

I assume this is in the Begin.vi, and that you actually have a pressure switch connected to DIO 2 and a compressor on a Spike connected to Relay 2. Are all the Digital Sidecar power LEDs lit? Is the Relay 2 status light coming on? Have you replaced the Spike's fuse with a 20A breaker?

Reading the status bits before the Compressor Start won't give you useful information, and those front panel indicators will not change after Begin has run. If you want to see the compressor enable status while the program is running, put the function in one of the loops in Periodic Tasks.

DavidGitz
06-04-2010, 11:32
put the function in one of the loops in Periodic Tasks.

Make sure you keep the compressor code you have where it is. The function you put in the periodic tasks should be a get refnum of the compressor and then read the state from there.

team3329
08-04-2010, 09:51
Everything is wired correctly. The pressure switch is connect in the digital side car in DIO 2 and the relay is on the digital side car Relay 2. We replaced the entire spike relay just to make sure that it wasn't that kind of error. In the Begin.vi I want the compressor to start up and run. I tried it in the periodic tasks (the Compressor Start), however everyone said that it needs to go in the begin.vi and let alone. Everytime I run the code I expect the compressor to come on but it doesn't.

Oddly before it worked when I created a seprate vi that had Open>>Start in the 100ms periodic tasks - the problem was the allocation error. I fixed it by moving it to begin like it was supposed to and now nothing works

ps. thnks

Alan Anderson
08-04-2010, 10:02
Everything is wired correctly...Everytime I run the code I expect the compressor to come on but it doesn't.

Have you verified that the pressure switch is closed? Did you enable the robot? Are there any diagnostic messages on the Driver Station? Is the Relay 2 Fwd status light on the Digital Sidecar coming on? What color is the LED on the Spike itself? Have you replaced the Spike's fuse with a 20A breaker?

Joe Ross
08-04-2010, 10:14
What is the state of DIO 2 on the dashboard. If it is off (dark), the pressure switch is wired and working correctly. If it is on (green), there is a problem with the pressure switch or wiring.

Also look at the state of relay 2 on the dashboard. If it is green, but the corresponding LED on the digital sidecar isn't green, then you likely have a problem with the digital sidecar wiring. What is the color of the LED on the compressor spike?

team3329
08-04-2010, 11:11
8987

8988

Here is my spike and dio. No lights are on on the dashboard for the relay. The Diognostic error is: Watchdog Expiration System12, User 3
No Change to Network Configuration: "Local Area Connection"
I/O unit not detected or installed correctly.

The amp breaker is 20 and is working. The light on the spike is orange (kinda hard to see in picture)

the robot is enabled in Teleop

Ps I can still drive

Alan Anderson
08-04-2010, 12:13
Your picture of the Spike shows its fuse still in place. Remove it and replace it with a 20A circuit breaker. The startup current for the compressor is high enough that you will blow a fuse eventually.

You haven't confirmed that the pressure switch is actually calling for the compressor to run. What is the state of the DIO2 indicator on the Dashboard? As a test, connect a wire directly across the terminals on the pressure switch to force the DIO input active.

DavidGitz
08-04-2010, 16:28
I suspect the switch isn't working, either it is not working itself (maybe) or the wiring isn't right (more likely). If you short the pressure switch sensor wires together the compressor should run and stay on (Please don't do this for long, unless you have all the relief valve's installed) and the relay led should turn green.

team3329
09-04-2010, 10:02
The pressure switch isn't working when shortened. The relay light isn't on on the dashboard and I'm not sure if the GPIO State is the DIO indicator - if it is then the light isn't on.

Could you show me a pic of a 20A breaker just so i don't insert the wrong thing.

Thanks

Alan Anderson
09-04-2010, 10:29
The pressure switch isn't working when shortened. The relay light isn't on on the dashboard and I'm not sure if the GPIO State is the DIO indicator - if it is then the light isn't on.

If both the GPIO and relay lights are dark, it sounds like the program is not doing its job correctly. We might need to revisit the code.


The switch is already closed when the pressure is low. That will put a low level on the GPIO input, and the light will be off. Shorting it will have no effect. The light should be on only if the switch is open, which will happen when the pressure has reached 115 PSI. Shorting the pressure switch in that situation will force the compressor to remain on (that's how the main 120 PSI pressure relief valve is tested during inspection).

To further verify that the wiring is good, unplug the sensor from the DIO pin and make sure the light comes on (just like all the other lights associated with unconnected DIO pins should be).

Could you show me a pic of a 20A breaker just so i don't insert the wrong thing.

http://ep.yimg.com/ca/I/yhst-33833170891817_2102_12755410

team3329
09-04-2010, 11:10
OK we got the breaker in and its still not working. GPIO lights are ALL on when the plugs are pulled on the DIO port. Still the relays aren't turning on - even when we short the pressure switch