6.32 NC_COMMAND_SET_VIRTUAL_WHEEL Virtual Handwheel Feature
1. |
The PLC can use NC_COMMAND_SET_VIRTUAL_WHEEL to specify the virtual handwheel counter. |
- .x to set the virtual handwheel to use a set of plc short data as the virtual handwheel count value.
- .x>=1 and .X<1024 indicate the use of short data for the corresponding group number. Otherwise, this function is disabled and the original normal handwheel is restored. For example: x=70, which means using PlcData[70] as the counter value of the virtual handwheel.
2. |
The counter value is 16bit, 2's complement value. |
3. |
plc changes this value to make a virtual handwheel. Note that this value must be changed incrementally. Do not change quickly. |
4. |
sts.state3.bVirtualWheel will be 1 if the virtual handwheel is enabled, otherwise it will be 0. |
case 80://:Start virtual handwheel function
if(plc.ncCommand.flag = NC_COMMAND_SET_VIRTUAL_WHEEL && plc.ncCommand.finish){
plc.ncCommand.flag = 0;
} else {
plc.ncCommand.data.x = 70; // Using the virtual hand wheel count using PLC short data 70
plc.ncCommand.flag = NC_COMMAND_SET_VIRTUAL_WHEEL;
}
break;