Sign in to follow this  
Followers 0
Budke

1746 HSCE2 Flexibility

6 posts in this topic

I have a 1746 HSCE2 card installed and working in a SLC 5/05 chassis.  However, the SLC is running at a scan rate of 33ms, and that is hindering the accuracy of my machine.  Here's what I'm doing: each time a prox is seen by a digital I/O card, the PLC takes the current encoder counts from the 1746 HSCE2 card, subtracts the previous encoder counts (last time the prox was seen), and stores the difference in a register.  Basically, I'm just determining how many encoder pulses I have between each time the prox is seen.  The problem is that with a 33ms scan rate of the PLC program and with the speed of the machine, the methodology isn't accurate enough.  Is there a way to get more flexibility out of the 1746 HSCE2 card and have it handle more of the task so that I'm not hindered by the PLC scan rate?  For instance, can I wire the prox into the 1746 HSCE2 card to the encoder 2 spot somehow, have the cards processor determine how many encoder counts were seen from encoder 1 between pulses of the prox, and then put that in the encoder 2 count value (the output from the card and the input to the PLC).

Edited by Budke

Share this post


Link to post
Share on other sites

Whats your budget, if any?  The quickest way off the top of my head, in my opinion, is a second rack.  The cost of an HSCE2 could buy you another lower end processor can you can initially dedicate to this, and pass the data along if necessary, to the master processor through the various methods of data transfer.   

The other way is to improve the effeciency of your project.  33ms is a VERY long scan time in my opinion, especially where position is measured.  The thing about programs is it isn't standard practice to trim the fat off of a fat program.  By that I mean, some of your program doesn't need to be scanned all the time, but common practice is to have it scan all the time because it's quicker to program initially.  See if you can isolate some of your processes into a time scanned or even scanned sub routine.

Share this post


Link to post
Share on other sites

I'm not an expert on the update of the HSCE2, but I would approach this with the Discrete Input Interrupt (DII) feature of the SLC-500.    You can get the prox switch input to execute a specific ladder program file when it changes state, and that program file could use an Immediate Input instruction to grab the values from the HSCE2.

You should also look to see if the Store/Continue mode of the Z-pulse input on the HSCE2 is appropriate for you.   It sounds like you're doing almost exactly what it is meant to do "when a pulse arrives, store the number of counts since the last time that pulse arrived".    You would have to make sure you can interrupt the long program scan to grab that data, which might mean using the DII feature as well.

1 person likes this

Share this post


Link to post
Share on other sites

In kb what is the size of your program and how much opportunity do you have to idle the system if tuning is necessary? 

Share this post


Link to post
Share on other sites

To speed up the task handling of grabbing the 1746-HSCE2 internal registers when the prox changes state, with a SLC platform the fastest method is to put the code to move the register value after an IIM instruction.

https://www.courses.psu.edu/e_met/e_met430_jar14/prgflo/iim.html

SLC processors are A-B's old school processor...read inputs, execute logic, write to outputs; SLC's will pause execution of logic (to some extent) to execute an IIM instruction based on the masking (i.e., mask the input status to look at the sensor changing state).

Edited by kaiser_will

Share this post


Link to post
Share on other sites

Thank you for the input.  A couple mentioned the IIM instruction.  I've never used it before, but it sounds like it will work.  I'll give it a shot.  The size of the program is 385 KB.  It was originally written with all of the program being scanned each time.  Trimming it down into event-driven sequences at this point would be difficult.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0