Jump to content

Recommended Posts

Can any body help me in how to create a input interrupt routine in unitronics plc. Other PLC like AB , Siemens , Omron , Delta, has this type of routine.

The input subroutine is immediately triggers on the rising edge of the input.

 

Application.

I am using a encoder with marker pulse. I am using this marker pulse to reset the encoder counts, but at the same time i need to reset some other MI's of the plc. I am also using the HSC reload option to generate _HSC interrrupt. At every HSC interrupt i am storing the current valve of the encoder to a series of MI. E.g 1st interrupt  MI0 , 2nd Interrupt MI1 and it goes on till it reaches to a certain point.

 

When i get the marker pulse i want to reset the encoder value and at same time all other value store in the series of MI, MI0, MI1, till may be MI10.

 

i am using a 36000 ppr encoder so i cannot depend on scan time to reset these MI. I tried it but then i miss the 1st two MI readings. The marker pulse is so small that sometimes its doesn't come in the scan time.

 

Encoder speed is 5-10 RPM.

 

If i get the option of input interrupt routine then i will configure the marker pulse as input interrupt and reset all MI when marker triggers.

Link to comment
Share on other sites

Hi sunit,

 

Unitronics does have interrupt capabilities, although using this feature in Visilogic will probably not give the best results. That is because the interrupt routine runs every 1.25ms (in the Enhanced Vision series, or 2.5ms in the Standard Vision series). According to the encoder details you provided, the pulse length for the encoder index pulse (or marker pulse) is calculated as follows:1/(encoder resolutionXRPM/60)=1/(36000X10/60)=1.67E-4 sec/pulse. This time frame is to narrow for the 1.25ms (1.25E-3 sec) interrupt routine to "catch" the index reliably.

If available, you can try using the index pulse input in a spare high speed input and run the HSC interrupt routine for this input.

 

Anyway, please attach your application to this post. I would like to understand how the system works and might find a better solution.

Link to comment
Share on other sites

The idea of using index pulse with high speed input is good but there is another limitation to this that is i want to take action on the rising edge of the index pulse. HSC interrupt will take action on falling edge. Then also i will try on falling edge if it works better i will use it that way.

 

Input Interrupt are very useful for motion application. E.g i am doing a cut to length application where i have one stepper motor with drive connect to v130-j-tr20.

I am pulling a plastic film which has a mark on it. i have to stop on the mark. The application works fine on slow speed but as i start increasing the speed the mark starts shifting this is because of the scan time. If if have input interrupt we can stop the motor on the rising edge of the mark. So its necessary to add such hardware features to PLC.  

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...