Shows how to turn power outputs on and off on MTX.The 'mtx' Linux kernel module must be loaded, and the /dev/mtx character device must have been created (see mtxPowerControlDriver documentation). You must have read/write access to /dev/mtx.
#include "Aria.h"
#include "ArMTXIO.h"
void testPower(
ArMTXIO& io,
const char* name,
int bank,
int bit,
const char *conndesc)
{
ArLog::log(
ArLog::Terse,
"mtxPowerControl: Turning on %s (bank %d bit %d) for 3 seconds. This is at connector %s", name, bank, bit, conndesc);
}
int main(int argc, char **argv)
{
{
{
}
}
{
}
robot.
comInt(ArCommands::JOYINFO, 0);
{
}
testPower(io, "Aux_5V_Out", 3-1, 1-1, "AUX POWER pin #4");
testPower(io, "Aux_12V_Out", 3-1, 2-1, "AUX POWER pin #5");
testPower(io, "Aux_20V_Out", 3-1, 3-1, "AUX POWER pin #6");
testPower(io, "Aux_24V_Raw_1", 2-1, 5-1, "USER POWER pin #7");
testPower(io, "Aux_24V_Raw_2", 2-1, 6-1, "USER POWER pin #8");
testPower(io, "Aux_24V_Raw_3_4", 2-1, 7-1, "USER POWER pins 9, 10 (no estop), 11, 12 with estop)");
}