Posted 19 Feb 2016 (edited) 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 19 Feb 2016 by Budke Share this post Link to post Share on other sites
Posted 20 Feb 2016 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
Posted 20 Feb 2016 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
Posted 21 Feb 2016 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
Posted 22 Feb 2016 (edited) 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 22 Feb 2016 by kaiser_will Share this post Link to post Share on other sites
Posted 22 Feb 2016 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