Log in

View Full Version : Bizarre issues with compressor code


Rafael Vasquez
10-02-2010, 21:31
For convenience on our bot, we are moving the digital side car module to slot 6 instead of slot 4 on the CRio. In begin.vi we have attempted to change the default of slot 4 to slot 6 by feeding that input a constant (slot 6).

However, the compressor still doesn't work. We have checked all inputs into 'Compressor Open' and they are the same as those that we have plugged in on the bot.

When the code is running and I probe the wire going from the constant that reads 'slot 6' to the input on the vi, the probe says 'Default'. I know that the default setting that it is trying to use is slot 4, but I cannot change this.

Does anyone have any idea as to what is going on, why it's happening, and how to fix it? I can provide any more information that anyone needs, but I can't get a screenshot of the code up.

Ziaholic
10-02-2010, 21:55
We're not allowed to move the modules around. You must use them in the slots and order specified. The only non-standard thing that I've heard of is the ability to add a second solenoid module out next to the one at the end of the cRIO.

Move the module back to where it belongs, change your Open's back to default slot settings and I bet your code will work like a charm.


[edit] ... ooops ... my bad ... I didn't realize that Slot6 is the "other" valid location for the DIO module ... sorry ... you're right, that should work.

Joe Ross
10-02-2010, 22:26
For convenience on our bot, we are moving the digital side car module to slot 6 instead of slot 4 on the CRio. In begin.vi we have attempted to change the default of slot 4 to slot 6 by feeding that input a constant (slot 6).

Keep <R59> in mind before you go too far down this path.

When the code is running and I probe the wire going from the constant that reads 'slot 6' to the input on the vi, the probe says 'Default'. I know that the default setting that it is trying to use is slot 4, but I cannot change this.

Are you calling this in begin? The probe only works when you set the probe before the data flows. In begin, it's probably run before you set the probe, so you don't see the real value. If you really think this is a problem, you could use the highlight execution to slow things down and also set retain wire values.

We're not allowed to move the modules around. You must use them in the slots and order specified. The only non-standard thing that I've heard of is the ability to add a second solenoid module out next to the one at the end of the cRIO.

The slots are defined by the FPGA image. Analog in 1 or 2, Digital in 4 or 6, solenoid in 7 or 8. A few features are restricted to a single slot (gyro and battery in slot 1, RSL in slot 4). Rules further restrict what you can use to compete, even if the code would work fine in the other slot. For example <R66> specifies an analog module must be in slot 1 for monitoring the battery voltage. There shouldn't be any reason in the code why the compressor works in 4 and not in 6. If he moves the digital module back to slot 4 and the compressor starts working, that would indicate a bug in the libraries or FPGA (or that he missed a reference to slot 4).