Stumped: SLC500 and HSCE2

dalem

Member
Join Date
Sep 2005
Location
NE Wisconsin
Posts
104
Been in and out of here many times in last few months, most often found the answer I was looking for. Great site. Finally need to post a question. Any assistance will be much appreciated.

The hardware I'm using for this retrofit project is as follows.

1746-L40A fixed processor, expansion slots, FIO4V analog, HSCE2 and Panelview550.

Half of this hardware I already had, thus the reason for the fixed processor. What I'm wanting to do, is to replace a "thumbwheel board" on a strip feeding machine with this PLC set up. The feeder has a servo amplifier that the -10 to +10vdc analog will output to. I have the Panelview about done and most of the control programming and alarms done and the analog output work done. I even have the HSCE2 working with my temporary 60ppr encoder. I'm testing the set up in my office. The encoder on the feeder is 2000ppr, so some changes will be needed before I go on the machine.

Here's my problem. I'm am reading the encoder pulses and stuffing 0-999 in one N: word for the thousandths of an inch, then when that rolls over, adding one to the N: inch word. This works great. Forward and backwards. (Backwards is not needed for the application.) Problem is, when the encoder hit the max and rolls over. I've tried numerous things and all have caused strange behavior of my inch and thousandths words. I currently have the programming block for the HSCE2 set for a min of 0 and a maximum of 14999. (Tried 15000 this morning.)

If anyone has suggestions on what I'm not catching on to, example(s) or where I can go for some examples, you might save me much sleep (or lack of) this week end. I honestly did not think this was going to be the hardest part of this project, but it has me stumped today. If I can supply any more info, please ask.

Thanks in advance for any assistance.

Dale
 
Last edited:
Dale,
Do a search on this site with the keyword encoder and user name Peter Nachtwey. Peter has posted on this topic several times and has some excellent solutions.
 
Thanks for the reply. Not sure why, but of all the time I stumbled onto this site was due to Google searches that brought me here. Encoder rollover never did and guess I did not think about searching from right with in this board. The example by Peter and others looks close to what I tried, but maybe I just need to go back to that file and start over there. Perhaps I added on something else that's making it quirky. I'll most likely remove the min and max limits on the counter in the HSCE2 control block too.
 
Remove your min and max limits on the control block. Also, under IOConfig in the project tree, double click your HSCE2 card, and then click the advanced options. Set it for class 4 and you will have a counter that doesn't over flow until (2^24)-1.
 
I'm sorry. Perhaps I'm slow to catch on or suffering a major brain f&rt on this one. First off, let me mention, I am not doing any sort of school work project. This is a conversion project I'm attempting here at work. (Just in case anyone was wondering.)

I did go back and search out and read the "encoder rollover" thread and suggestions by Peter L and others. I believe I have summed up that those suggestions may not work in my case. First off, I am stuck with a 1747-L40A fixed processor. Thus (I believe) no 32bit counter, no floating counters and any other short comings of this fixed processor. I have tried what I could starting out with some of those suggestions which brings me back about where I left off last week. I just keep adding on things that probably are not need to try to stop oddities with my counter.

Sorry if this is a touchy subject, but perhaps someone could offer a simpler solution that I can use with this simple processor. Following is what I need to do. If I'm looking at it wrong and someone has a better idea, I'm open to about anything at this point. (With the exception of buying a better PLC.)

I have the HSCE2 running from -32767 to 32767.

I want to read pulses and count up from 0-999. This is for my thousandths of an inch. (Will need to scale the pulses to get something like 2000 pulses = 12.5", but saving that till later. I think.)

When I read 999, reset this counter (nSWcounter thousandths) back to zero and add one to my inch counter (nSWinchcounter)

From what have I read here, I think I see something I can do different, maybe. I have been thinking in terms of inches and thousandths of an inch. Mainly due to needing to enter 0-999.999" into the Panelview and displaying an actual feed length back to the Panelview. I recon, I should convert my inches into pulses for the PLC to work with then convert the actual pulses back to my inch readings for the Panelview. I wonder though if I'll still wind up in the predicament that I'm in now?

Thanks againin advance for any consideration and/or suggestions.

Dale
 

Similar Topics

Anybody have any info on the address prefix "B" used on the DL06 units? I am working with 4 Direct Logic DL06 units (D0-06AR) connected to each...
Replies
2
Views
1,766
Anybody have any info on the addressing prefix "B" used on the DL06 units? I am working with 4 Direct Logic DL06 units (D0-06AR) connected to...
Replies
3
Views
1,694
i have a hwk question that i cant get fixed right. attached is the jpeg of what i have done soo far and question is attached as well any help is...
Replies
14
Views
2,307
Hello: I have a micro820 plc with a Spectrum Controls 2080sc-IF4 analong module and a Prosoft 800 SMS module. I have 3 4-20ma pressure sensors...
Replies
1
Views
1,225
Good Morning Everybody, I'm using RSLogix500 and programming a Micrologix 1100. I define all my outputs using B3 data file and reference those...
Replies
5
Views
1,936
Back
Top Bottom