HSC Logix 500

jimmy689

Member
Join Date
Oct 2018
Location
australia
Posts
5
Hi Guys

I Have my HSC running and reading all good. My problem is im trying to use the accumulated value to move a motor along 30 pulses then turn it off with a Greater than or equal to. set at 30. this all works well

But my problem is I want to keep the total value of the HSC accumulating which it does but i also want to reset the total of the greater than or equal to somehow or someway back to 0 so then it can go another 30 when i re enable it.

Anyone have any Ideas

Thanks

James
 
Don't reset the counter, just calculate the next target as an offset. Be sure to check the result of the calculation to account for rollover. This can end up a little bit complicated if you have a target "window" that wraps around the rollover point, but avoids the possibility of missing a count which can happen if you reset the accumulator.
 
Yea I kind of see what you mean but is there a way of just counting the pulses that happen in a separate sub routine only when that routine is enabled? So the main ACC value always counts in the main program but the Count in the subroutine only counts up when that routine is enabled?
And any possible way to reset the count value in the sub routine without resetting the count in the main program?

TIA
 
I would not do it in a conditional routine, but essentially, say your counter accumulator is 12345 when you want to "store home"...

You just MOV the "A" (actual) value to a L (or N if it will fit) register. Then your new position count is constantly calculated as P=A-L, where P is position, A is actual raw counts, L is last stored "home". So P will be zero and you can use that for your logic condition checking.

The tricky part is rollover. I have seen a couple of novel ways of dealing with it, one is more for bidirectional counting, or even if there is any possibility of counting down.

If you have states in your machine where you are guaranteed that no movement can occur, then you can avoid the rollover calculation(s) by resetting the counter only when in that state. This is only useful if your machine will always reach the reset state before the counter can rollover.

Dealing with the rollover is sometimes not bad at all especially in unidirectional machines. Tell us what you are counting and can it ever go "backwards".
 
I'm counting rope on a pulley and yes i need it to count backwards slightly sometimes but mainly forwards. the rollover won' matter to much it doesnt have to be accurate to the exact pulse.

What does "store home" mean

Long story short on a conditional rung at certain times i want to move the rope 30 pulses in the forward direction then stop and run the rest of program until it gets back to the same point then move in forward 30 pulses again and so on.
 

Similar Topics

Hello All: I have a Micrologix 1500, 1764-24BWA, 1764 LRP procesoor unit. I want to know if is possible use 3 encoders in ML1500 one of them...
Replies
2
Views
2,199
Hi, so I'm having this problem. I have a motor's quadrature encoder connected to a PLC input. When turning the shaft of the motor by hand, the PLC...
Replies
4
Views
1,567
Hi, everyone. I am having problems with HSC:0 in ML1500.My FE and CE functions are enabled and PLC keeps faulting as soon as I put him to...
Replies
1
Views
2,763
Have not figured out how to get a triggered output from HSC:0 Mode 0, "0 Up Counter - The accumulator is immediately cleared (0) when it reaches...
Replies
2
Views
1,930
I am new to automation and new to the forum. I was wondering where I could find any sample programs for a Micrologix 1500 and 1746-hsc module. I...
Replies
4
Views
3,344
Back
Top Bottom