We are using C++ and we're having trouble figuring out how to construct AnalogChannel objects when you have two analog modules.
I know there is a constructor for AnalogChannel that takes a slot and a channel as parameters, but for some reason this did not work for us. For instance, we tried this code (whittled down):
Code:
// In global section
enum cRIO_slots {cRIO_slot_1 = 1, cRIO_slot_2, cRIO_slot_3}; // And so on
enum analog_mod_channels {gripper_pot_channel = 1}; // And so on
// In the spot where objects are declared
AnalogChannel gripper_potentiometer;
// In the spot where all the objects get constructed
gripper_potentiometer(cRIO_slot_1, gripper_pot_channel),
This code basically did not work. In fact, it caused certain things to go completely out of control.
What are we missing here? Are the modules 0, 1, 2, 3 instead of 1, 2, 3, 4, or something?
Thanks in advance!