Hi all, I've been involved in a project with an ML1100 and AB 845H-SJDB26CSY2C incremental encoder.
Initially we set up the encoder and had a nice repeatable result while the project was minimal. I was not surprised to find it lost some repeatability as the program size grew substantially. I thought this would be a simple matter of utilising the interrupt as assigned in the HSC file, and load the desired pulse count into the upper count. All this was achieved, and initially is seemed ok, but there is still the occasional variation of a few mm, which given the current slow operating speeds really isn't up to scratch. I've used HSC's in siemens PLC's before without any hassles, but am unsure If I'm missing something with the AB stuff. Are outputs written to immediately from the interrupt when called? or does a specific instruction need to be used like an SI (set intantaneous)?
Also, we've only had luck setting the encoder up as an up counter. The up/down didn't seem to work, and the cable that the project sparky wired it with isn't shielded, I assume it should be.
A brief overview of the setup
1/ operator inputs distance required
2/ distance in mm is multiplied to convert it to pulses
3/ a mov statement was used to convert the FP to an integer
4/ a mov was used to move the integer into the HSC upper count
5/ a subroutine was specified as the interrupt in the HSC file, no special labels were used to designate it as an interrupt though.
6/ an unlatch for the motor contactor OP was placed in the interrupt.
Still no dice, I'm sure I must be missing something simple
Initially we set up the encoder and had a nice repeatable result while the project was minimal. I was not surprised to find it lost some repeatability as the program size grew substantially. I thought this would be a simple matter of utilising the interrupt as assigned in the HSC file, and load the desired pulse count into the upper count. All this was achieved, and initially is seemed ok, but there is still the occasional variation of a few mm, which given the current slow operating speeds really isn't up to scratch. I've used HSC's in siemens PLC's before without any hassles, but am unsure If I'm missing something with the AB stuff. Are outputs written to immediately from the interrupt when called? or does a specific instruction need to be used like an SI (set intantaneous)?
Also, we've only had luck setting the encoder up as an up counter. The up/down didn't seem to work, and the cable that the project sparky wired it with isn't shielded, I assume it should be.
A brief overview of the setup
1/ operator inputs distance required
2/ distance in mm is multiplied to convert it to pulses
3/ a mov statement was used to convert the FP to an integer
4/ a mov was used to move the integer into the HSC upper count
5/ a subroutine was specified as the interrupt in the HSC file, no special labels were used to designate it as an interrupt though.
6/ an unlatch for the motor contactor OP was placed in the interrupt.
Still no dice, I'm sure I must be missing something simple