steveneads Posted July 23, 2014 Posted July 23, 2014 As I understand it Sys.pushm can be used as a convenient method of disabling inputs and outputs, ie: Motor[2].pDac=Sys.pushm; Motor[3].pPhaseEnc=Sys.pushm; Am I correct that this is OK? My worry is that an output such as Motor[2].pDac will put data into this address which will then be read by "unused" inputs also pointing to Sys.pushm.
curtwilson Posted July 25, 2014 Posted July 25, 2014 At re-initialization, motors that do not have hardware channels auto-assigned to them have input and output pointers assigned to the register at the Sys.pushm address. These motors are not activated, so the register is not actually addressed. If you have an active motor, and want to assign an output to a do-nothing, harmless register, Sys.pushm is a good choice. As for inputs, you do want to be a little more careful, I think. Safety flag inputs like pLimits, pAmpFault, pEncLoss, and pAuxFault are better just set to 0 to disable the function altogether. I'm not sure why you would want to redirect position input pointers.
Recommended Posts