Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Initialize Module on Non-Default Slot (http://www.chiefdelphi.com/forums/showthread.php?t=102246)

el-zoroo 08-02-2012 00:41

Initialize Module on Non-Default Slot
 
We have an extra Solenoid breakout we are trying to add. One is wired up for 24V and the other for 12V, and are having trouble initializing the second one. The first one is working perfectly fine. We encountered the same problem with the Analog breakout.

We initialize it like so, in Java:

Code:

Solenoid solenoid = new Solenoid(6,4); //Slot 6, Channel 4
Upon running the code, it immediately warns us that "Solenoid module 6 is not present" (or something to that effect). Subsequently, it throws an AllocationException.

Any help on initializing a module on its non-default slot?

Thad House 08-02-2012 00:42

Re: Initialize Module on Non-Default Slot
 
Because of the new Module naming system, instead of slot number you need to call module number. so instead of 6 you would use 2.

el-zoroo 08-02-2012 00:48

Re: Initialize Module on Non-Default Slot
 
Thanks for the quick reply!

I had a suspicion about that when I was looking at the Javadocs.

But, how does the channel numbering work then? In other words, how would it know which module to go to if there are 2 solenoid breakouts?

Thad House 08-02-2012 00:56

Re: Initialize Module on Non-Default Slot
 
If using a 4 slot CRio, slot 1 is analog 1, slot 2 is digital 1, slot 3 is solenoid module 1. slot 4 is the second instance of whatever module you put in it. If using the 8 slot CRIO, 1,2 and 3 are the same as the 4 slot, and the slot 5 is analog 2, slot 6 is digital 2 and slot 7 is solenoid 2.

el-zoroo 08-02-2012 01:00

Re: Initialize Module on Non-Default Slot
 
That makes a lot more sense!

Thanks!

Bpalms 16-02-2012 15:05

Re: Initialize Module on Non-Default Slot
 
Yeah Thanks a lot I was having this problem and I was ripping my hair out over this and this got it working for me.

silvereagle 19-02-2013 17:58

Re: Initialize Module on Non-Default Slot
 
We are having the same trouble with the solenoid module. We are using an 8 port CRio, so we have declared our solenoid as
Solenoid s1 = new Solenoid(1,1);
Solenoid s2 = new Solenoid(1,2);

We have the solenoid module plugged into port 8 of the Crio and wired for 24V. We get a power light on the solenoid breakout, but when we upload the Java code, we get the error Solenoid Module 1 is not present (4 times on one deploy). Should any of the 8 leds be on when we boot up to signal that the module has power?

Thanks for the help.

Mark McLeod 19-02-2013 18:13

Re: Initialize Module on Non-Default Slot
 
On an 8-slot, Solenoid Modules go in cRIO chassis slots 3 & 7


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

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