Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Using 2 digital side cars (http://www.chiefdelphi.com/forums/showthread.php?t=102573)

blackwood 11-02-2012 16:45

Using 2 digital side cars
 
Our team is having problems trying to use two digital sidecars.

We are using JAVA, and the code compiles but says there is no second digital module,(and we have two attached) and that the channels we are trying to use are already allocated.

Any suggestions?

Thanks.

MrBasse 11-02-2012 16:48

Re: Using 2 digital side cars
 
are your modules in the proper slots on the crio? When you image the rio does the imaging tool recognize all of the slots being used properly?

blackwood 11-02-2012 17:09

Re: Using 2 digital side cars
 
Yes they are in the proper slots, and yes the imaging to for the c-rio recognizes all slots as being used properly.

MrBasse 11-02-2012 17:12

Re: Using 2 digital side cars
 
on the bright side that all but eliminates a mechanical connection issue, so that leaves it to the way you call the devices in your code. Unfortunately not being a java guy this is where I have to say good luck and hopefully someone with experience in the programming area can chime in... When I see these threads I know the first thing people want is to see the code where you activate and assign channels.

blackwood 11-02-2012 17:16

Re: Using 2 digital side cars
 
Thanks for trying. Hopefully someone will have more advice soon!

CalTran 11-02-2012 19:11

Re: Using 2 digital side cars
 
I know that this is going to sound odd, but have you checked the modules themselves? At the beginning of our season, we hit a snag and our programmers tore hairs out trying to fix code until it turned out to be a bad module.

JByrd 11-02-2012 19:14

Re: Using 2 digital side cars
 
when you construct your inputs and outputs do you have the code written with the module number like this:

DigitalInput input = new DigitalInput(2,1)

(for a digital input in port 1 on the module on slot 2 of the cRIO)

or

DigitalInput input = new DigitalInput(4,1)

(for a digital input in port 1 on the module on slot 4 of the cRIO)

slijin 11-02-2012 19:20

Re: Using 2 digital side cars
 
Quote:

Originally Posted by CalTran (Post 1124557)
I know that this is going to sound odd, but have you checked the modules themselves? At the beginning of our season, we hit a snag and our programmers tore hairs out trying to fix code until it turned out to be a bad module.

I have to second this.

Try reversing your modules (move the one from slot 2 to 4 and viceversa) and see which ones work.

Alan Anderson 12-02-2012 11:26

Re: Using 2 digital side cars
 
Quote:

Originally Posted by JByrd (Post 1124564)
when you construct your inputs and outputs do you have the code written with the module number like this:

DigitalInput input = new DigitalInput(2,1)

(for a digital input in port 1 on the module on slot 2 of the cRIO)

or

DigitalInput input = new DigitalInput(4,1)

(for a digital input in port 1 on the module on slot 4 of the cRIO)

If you do have the program written like this, fix it. :p You shouldn't be referencing slot numbers in the code. The first digital module (in slot 2) is module 1. The second digital module (in slot 4 of a 4-slot cRIO or slot 6 of an 8-slot cRIO) is module 2.

blackwood 13-02-2012 12:38

Re: Using 2 digital side cars
 
Quote:

Originally Posted by Alan Anderson (Post 1124927)
If you do have the program written like this, fix it. :p You shouldn't be referencing slot numbers in the code. The first digital module (in slot 2) is module 1. The second digital module (in slot 4 of a 4-slot cRIO or slot 6 of an 8-slot cRIO) is module 2.

Thanks. I will pass this on to our programmers. Just curious, where did you find this information? If there is some documentation that has this info, I would appreciate it.

SousVide 13-02-2012 12:50

Re: Using 2 digital side cars
 
The WPI Getting Started with Java Guide:
http://firstforge.wpi.edu/sf/docman/..._documentation

Page 15: Constructors with Slots and Channels



Quote:

Originally Posted by blackwood (Post 1125709)
Thanks. I will pass this on to our programmers. Just curious, where did you find this information? If there is some documentation that has this info, I would appreciate it.


blackwood 13-02-2012 19:49

Re: Using 2 digital side cars
 
Quote:

Originally Posted by SousVide (Post 1125715)
The WPI Getting Started with Java Guide:
http://firstforge.wpi.edu/sf/docman/..._documentation

Page 15: Constructors with Slots and Channels

Thank you everyone. We got it to work!


All times are GMT -5. The time now is 00:52.

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