Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Weird behavior in our code (http://www.chiefdelphi.com/forums/showthread.php?t=125630)

Landonh12 01-02-2014 17:04

Weird behavior in our code
 
We are having problems getting our pressure switch for the compressor working. Here's what's happening:

- When the robot is disabled and the code is deployed, I can see the pressure switch state by an indicator in Periodic Tasks.vi.
- When the robot is enabled, the state goes false, not changing no matter what the pressure switch reads.

It's like the robot just does not want to read the inputs we have in DIO on the sidecar while the robot is enabled.

Invictus3593 01-02-2014 22:43

Re: Weird behavior in our code
 
Can you post a picture of the code you are running? This can help us better identify the problem!

Alan Anderson 02-02-2014 00:31

Re: Weird behavior in our code
 
False on a DIO means the signal is being pulled low. A properly wired pressure switch will do that when the pressure is too low and it is calling for the compressor to run.

What do you see the indicator doing when you completely disconnect the pressure switch? If it still says the switch state is false, there's something very wrong. Either the hardware (or the cRIO image) is faulty, or your code isn't reading the input properly.

Joe Ross 02-02-2014 01:55

Re: Weird behavior in our code
 
If you remove the DB-37 cable from the digital sidecar, are all three power LEDs brightly lit?

Landonh12 03-02-2014 13:44

Re: Weird behavior in our code
 
Quote:

Originally Posted by Invictus3593 (Post 1336124)
Can you post a picture of the code you are running? This can help us better identify the problem!

It is the example compressor code. I'm opening the Compressor in DIO 1 and Relay 1, and setting the RefNum to Compressor. In Periodic Tasks, I am doing a RefNum Get (Compressor) and feeding that into the Compressor Control Loop.

Quote:

Originally Posted by Alan Anderson
False on a DIO means the signal is being pulled low. A properly wired pressure switch will do that when the pressure is too low and it is calling for the compressor to run.

What do you see the indicator doing when you completely disconnect the pressure switch? If it still says the switch state is false, there's something very wrong. Either the hardware (or the cRIO image) is faulty, or your code isn't reading the input properly.

I'll check that today. I'll get back to you later.

Quote:

Originally Posted by Joe Ross
If you remove the DB-37 cable from the digital sidecar, are all three power LEDs brightly lit?

BATT doesn't come on. 5V and 6V is on, though.
This is our 3rd Digital Sidecar. I highly doubt all 3 are bad. The new one we got in the KOP was bad because 6V wouldn't come on. We know we are supplying 6V because it showed up on 2 other Sidecars and we checked it with a multimeter.

Mark McLeod 03-02-2014 13:57

Re: Weird behavior in our code
 
Quote:

Originally Posted by Landonh12 (Post 1336905)
BATT doesn't come on. 5V and 6V is on, though.

So you have the Sidecar wired to the power distribution board at a pair of the 20/30a red/black wago connectors with a 20a breaker and it still isn't receiving power (no BATT LED)?
Once the sidecar is getting proper 12v power from the battery all three power LEDs will be brightly lit.
example - top DSC is with no 12v power, bottom is with 12v power

It's not going to work until you can get 12v into it.

Landonh12 03-02-2014 16:27

Re: Weird behavior in our code
 
Quote:

Originally Posted by Mark McLeod (Post 1336911)
So you have the Sidecar wired to the power distribution board at a pair of the 20/30a red/black wago connectors with a 20a breaker and it still isn't receiving power (no BATT LED)?
Once the sidecar is getting proper 12v power from the battery all three power LEDs will be brightly lit.
example - top DSC is with no 12v power, bottom is with 12v power

It's not going to work until you can get 12v into it.

This is what we have now: http://m.imgur.com/Zo5pqK0

Looks like our electrical team wired it up in the wrong spot. It should come out of one of the 30A MAX ports with a 20A breaker, correct?

Ether 03-02-2014 16:47

Re: Weird behavior in our code
 
1 Attachment(s)
Quote:

Originally Posted by Landonh12 (Post 1337033)
Looks like our electrical team wired it up in the wrong spot. It should come out of one of the 30A MAX ports with a 20A breaker, correct?


USFIRST and ScreenstepsLive web pages have all the info you need to wire the bot properly.


USFIRST.ORG "Power Connectivity Diagram"
http://www.usfirst.org/sites/default...icalLayout.pdf

DSC Excerpt from above:
http://www.chiefdelphi.com/forums/at...7&d=1389920308



WPI ScreenstepsLive "Wiring the 2014 FRC Control System"
http://wpilib.screenstepslive.com/s/...control-system

DSC excerpt from above:
http://www.chiefdelphi.com/forums/at...d=13914640 67



USFIRST.ORG "Data Connectivity Diagram"
http://www.usfirst.org/sites/default...gnalLayout.pdf



Mark McLeod 03-02-2014 17:27

Re: Weird behavior in our code
 
Quote:

Originally Posted by Landonh12 (Post 1337033)
It should come out of one of the 30A MAX ports with a 20A breaker, correct?

Correct.
You can see that on Ether's first DSC link.

Joe Ross 03-02-2014 19:49

Re: Weird behavior in our code
 
Please let us know if that fixes the issue.

Landonh12 04-02-2014 07:58

Re: Weird behavior in our code
 
Quote:

Originally Posted by Joe Ross (Post 1337160)
Please let us know if that fixes the issue.

Yep, that fixed it. Thanks for the help!


All times are GMT -5. The time now is 09:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi