Jump to content

Recommended Posts

  • External Moderators
Posted

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

  • External Moderators
Posted

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
Posted

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
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.