Changing counter preset from panelview

realolman

Member
Join Date
Mar 2009
Location
here
Posts
584
I have a counter in ControlLogix that I would like to change the preset from Panelview
I can set the value of a DINT tag in Panelview and it appears in the ladder logic in the controller, so that much is good.

In the Tag editor the counter preset "CaseCounter.PRE" shows up as a DINT, but when I hover the cursor over the tag it show as a Counter data type.

I have a NEQ instruction to change the preset of the counter to the value set in the Panelview "CaseCountPreset" which is a DINT data type, but it doesn't seem to work... I also tried to COP the CaseCounter.PRE to a DINT using a COP instruction then trying to set the counter preset using the NEQ instruction if the value from the Panelview is diffeent fronm the existing counter preset.

To make a long story short ... How can I change CaseCounter.PRE to the value in CaseCounterPreset in ControlLogix Ladder logic

thanks again
 
Last edited:
Within the FTVS application add a Numeric Input Enable graphic object which's reference tag is "CaseCounter.PRE".
The Timer and Counter Logix data type tags will be listed in the left-hand pane of the FTVS tag browser bellow the Online/Offline expanded folder. When you double-click on any of the Timer or Counter tags, the right-hand pane will enable you to pick either the .ACC or the .PRE values to be referenced under the graphical object's connections tab.
 
Within the FTVS application add a Numeric Input Enable graphic object which's reference tag is "CaseCounter.PRE".
The Timer and Counter Logix data type tags will be listed in the left-hand pane of the FTVS tag browser bellow the Online/Offline expanded folder. When you double-click on any of the Timer or Counter tags, the right-hand pane will enable you to pick either the .ACC or the .PRE values to be referenced under the graphical object's connections tab.
I think I'm probably writing in Martian again...

I have the values I want in the COntrolLogix5000 controller logic.

The Panelview part is done... It got the value to the controller. Actually, I think I forgot to put a JSR to the new routine I just put in. That may be the whole problem

Anyway, ...is this a valid operation?

|-----NEQ------- | |----MOV-----|
| CaseCountPreset |------- |source CaseCountPreset|
| CaseCounter.PRE| |dest CaseCounter.PRE

I can't get it to display like I want... the whole idea is that if the operator enters a number that ends up in CaseCountPreset, and if it is different that the counter preset, the MOV will change the counter's preset to the number entered by the operator.
 
Last edited:
Just a couple of comments.

The "NEQ CaseCountPreset CaseCounter.PRE" isn't really necessary. Just "MOV CaseCountPreset CaseCounter.PRE" will do the same thing.

You could have the Panelview just write directly to CaseCounter.PRE as suggested by dmargineau. That would also work the same.

However, I suggest you keep the Panelview writing to CaseCountPreset and change your PLC code as follows:

GRT CaseCountPreset 0 MOV CaseCountPreset CaseCounter.PRE

The reason is, allowing an operator to enter a negative number for a timer preset will fault the processor. You should prevent that.

Now you could do this with input limits on the Panelview and I recommend you do that as well. Limit both the minimum and maximum allowed to reasonable numbers for the timer.

However, leaving these values hardcoded in the Panelview is a bit of a pain to maintain. If you create two tags in the PLC CaseCountPresetMin and CaseCountPresetMax and use these tags as the limits in the numeric input on the Panelview, you have all the funtionality and you can change the limits if needed from the PLC without having to touch the Panelview App.
 
Last edited:
Forum tip for you.
To make the text code you entered line up use the ladder tags in your text.

To get

-+NEQ-------------+---------+MOV-------------+
| CaseCountPreset| | CaseCountPreset|
| CaseCounter.PRE| | CaseCounter.PRE|
+----------------+ +----------------+



Type the following

Code:
[ladder*]
-+NEQ-------------+---------+MOV-------------+
 | CaseCountPreset|         | CaseCountPreset|
 | CaseCounter.PRE|         | CaseCounter.PRE|
 +----------------+         +----------------+
[/ladder*]

Omit the * from the ladder tag
I put it there to make the tag show up
so you can see how to use the ladder tag, but leave
the asterisk out in an actual post.
 
Hey folks... those are excellent tips thank you very much. I never really thought about "setting" the counter preset every scan, but I suppose there isn't anything wrong with it, and it does eliminate a few unnecessary steps , and I never realized at all about the negative number.. I shall be sure to see that that doesn't happen.


-+-----NEQ-------+------+------MOV-------+--(ThanksForTheTip)
|
CaseCountPreset| |CaseCountPreset |
|
CaseCounter.PRE| |CaseCounter.PRE |
+---------------+ +----------------+




(Although I still don't seem to be able to get it right):sick:

I didn't know "ladder" was HTML ... You guys are the best
 
The ladder tag isn't HTML, in fact its not even normal BBcode. Its something Phil has set up.

Its a little quirky. If you try to edit it after its posted, or even do a preview and then post it, it is not going to always look right in the final post. Still, its a handy tool for showing simple ladder.

Another way is to just go straight for the mnemonics.

NEQ CaseCounterPreset CaseCounter.Pre MOV CaseCounterPreset CaseCounter.PRE

Many of the experienced programmers can follow mnemonics just as easily as a graphical ladder. If you want to get the mnemonics of a run in your ladder program double click on the rung number in RSLogix5000. When you do that a little text entry line will appear. Its at the top of the ladder display in Logix5000, or right above the rung in Logix500 and Logix5. That line contains the mnemonics for the rung. You can also program by typing into the entry line.
 
Last edited:

Similar Topics

Hi to all. We need to change a bad powerFlex 525 to a new one. How do you save the configuration to install in the new one? Thank you all for...
Replies
5
Views
267
Hi all, I am having an issue where some of my HMI push Buttons and Indicators go in to error when I navigate to a new screen. I am using a...
Replies
16
Views
507
We have a new machine that uses an armor block to transfer input signals for conveyor position that continuously alarms out on no position change...
Replies
0
Views
104
Hello everyone, I am trying to change the IP address of the Omron PLC (NJ30-1200) and HMI (NB7W-TW01B) to fetch the network on our network...
Replies
7
Views
308
Dear Experts, I'm just started working with GEO SCADA and I need your valuable help. Currently, I'm trying to edit the alarm limits on MIMIC...
Replies
0
Views
228
Back
Top Bottom