Quote:
Originally Posted by Dave Scheck
Specifically, it's these two lines
Code:
ArmRelease = new Relay(1);
Zone1 = new DigitalInput(1);
These both allocate Resources using the default slot with channel 1.
|
That's not correct Dave. The digital modules have 4 distinct resource types... PWM channels, Relay Channels, an I2C bus, and Digital I/O channels. Because they are separate resources, you will not get conflicts from using the same channel "number" in a different set of channels. This is best illustrated by looking at the digital sidecar itself and witnessing different pins for each of those channel types.
Quote:
Originally Posted by Dave Scheck
To fix this, you need to use the other constructor for these objects and specifically call out the slot number. I forget what the slot numbers are, but I found this in our 2009 code.
Code:
ap_rlyElevatorR = new Relay(1);
ap_elevatorLimitRightTop = new DigitalInput(4, 1);
|
This has no effect. The default digital module is 4, so explicitly specifying 4 is not any different than not specifying it. In either case, you are allocating the same channel. The reason this works is because the relay channels are separate from the digital I/O channels.