External Moderators tmoulder Posted October 21, 2010 External Moderators Report Posted October 21, 2010 Hi! I'm using a V350 with a HSC configured as Shaft Encoder x4. I have a preset and the encoder portion is working fine. The system is set up to turn on a feeder motor, and once the preset is reached, trigger _Interrupt HSC 0,1 to turn off the motor, via immediate out. Problem is, the interrupt routine never runs. I've checked my spelling on the routine name about 12 times (seriously, need to use something a little simpler, like assigning a routine in the configuration). I put in a bit set command to trap if the routine ran, and it never came on. I must be missing something subtle here. I'm using Visilogic 8.6.2, with the latest OS. Thanks, TM
Emil Posted October 21, 2010 Report Posted October 21, 2010 Hi Tim, My advice - go to relevant Help topic and Copy/paste from there the subroutine name.
External Moderators tmoulder Posted October 21, 2010 Author External Moderators Report Posted October 21, 2010 Hi Emil, Thanks for the tip, but unfortunately, it made no difference, the routine is still not being scanned. Reading the help, it makes repeated references to HSC with Reload. I saw from one of your posts in the old forum that HSC Reload won't work with a Shaft Encoder setup. I'm pretty much out of ideas here, so let's review the basics: 1. Name the interrupt file properly 2. Configure the High Speed Counter in Hardware setup by selecting the counting operand and target operand (ML0 and ML1, respectively). 3. And that's pretty much it, right? Thanks, TM
External Moderators tmoulder Posted October 21, 2010 Author External Moderators Report Posted October 21, 2010 I think I may have stumbled onto something here. If the HSC Reload cannot be used with Shaft Encoder mode (because I1 would be the reset, and in shaft encoder, it's the B channel) then it seems that the target parameter is being ignored. Yes, No, Maybe? TM
External Moderators tmoulder Posted October 21, 2010 Author External Moderators Report Posted October 21, 2010 Okay, I got it. To get the target position interrupt to work, you must use reload, and also set the Reload Enable bit. Which sucks, because I don't actually want the traveled distance to go back to 0. It would be better if the routine ran whether Reload Enable was set or not.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now