taichichuan
05-02-2013, 19:28
Greetings!
Is anyone aware of a way in software to determine whether code is running on a 4-slot vs. an 8-slot cRIO at runtime? We only have one 4-slot chassis and that's on the competition 'bot. But, our 8-slot chassis is being used for development and the 2nd solenoid module is in slot 7 on the 8-slot but slot 4 on the 4-slot. Yes, we can do a #define, but it would be convenient to be able to determine the slot count at run time. Anyone have an approach short of allowing something to fail to test it?
TIA,
Mike
Is anyone aware of a way in software to determine whether code is running on a 4-slot vs. an 8-slot cRIO at runtime? We only have one 4-slot chassis and that's on the competition 'bot. But, our 8-slot chassis is being used for development and the 2nd solenoid module is in slot 7 on the 8-slot but slot 4 on the 4-slot. Yes, we can do a #define, but it would be convenient to be able to determine the slot count at run time. Anyone have an approach short of allowing something to fail to test it?
TIA,
Mike