KFlop digital IO pins are swapped?
Posted: Mon Feb 20, 2023 4:53 am
I physically connected a limit switch (positive end) signal pin to IO0 (see the attached picture), but in the program, I have to configure LimitSwitchPosBit as 1, as shown below:
ch1->LimitSwitchOptions=0x112;
ch1->LimitSwitchPosBit=1;
SetBitDirection(1,0);
It works. But somehow, IO0 and IO1 are high and low at the same time based on the digital I/O screen, and they look like IO0 and IO1 are interconnected internally.
If I configure LimitSwitchPosBit as 0, the same as the physical pin connection. I cannot move ch1's axis toward the positive limit switch even if it's not triggered at all.
ch1->LimitSwitchOptions=0x112;
ch1->LimitSwitchPosBit=0;
SetBitDirection(0,0);
Is my KFlop broken?
ch1->LimitSwitchOptions=0x112;
ch1->LimitSwitchPosBit=1;
SetBitDirection(1,0);
It works. But somehow, IO0 and IO1 are high and low at the same time based on the digital I/O screen, and they look like IO0 and IO1 are interconnected internally.
If I configure LimitSwitchPosBit as 0, the same as the physical pin connection. I cannot move ch1's axis toward the positive limit switch even if it's not triggered at all.
ch1->LimitSwitchOptions=0x112;
ch1->LimitSwitchPosBit=0;
SetBitDirection(0,0);
Is my KFlop broken?