Jump to content

HSC Interrupt not triggering


Recommended Posts

  • External Moderators

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

Link to comment
Share on other sites

  • External Moderators

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

Link to comment
Share on other sites

  • External Moderators

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

Link to comment
Share on other sites

  • External Moderators

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...