Is what Im trying to do even possible? Structured Text

JZerb

Member
Join Date
Oct 2016
Location
Here
Posts
421
Panelview 800
Micro 850

I have a selector list, that shows some a list of REAL tag values. What I am attempting to do is add a numeric entry to the screen which will read the tag that is currently selected in the list, easy. Then once i press the numeric entry i can change the value in said tag, easy. BUT, heres the kicker, once i scroll onto the next value the numeric entry just keeps getting pushed into new tag thats selected. I feel like what i need to do is take the current value from the selected tag and move that value into the numeric input write tag, so that they are equal upon first selecting the tag in the list. the issue there is that once they are equal, if i ever change the value in the numeric input tag from the HMI, it will never write to the selected tag because its being told to constantly be equal to it.

i have solved this issue by adding a momentary push button to 'save' or 'load' the value from the numeric input into the selected tag from the list, but i was really thinking i could forgo that push button on the HMI and just get this to work through code. I have spent more hours then id like to admit on this pesky little idea and when i called Rockwell i was told "that push button sounds like a clever idea to get that to work because otherwise im not sure how you would do it" i know there are some smart people on here so what say ye?
 
- enter recipe number via numeric entry number1
- plc logic detects change in number1 value and will ONS pull the data and out and load it into number2
- user can modify if desired and Logic will compare number2 to the existing data If not equal AND verify that the previous ONS is not active then MOV.
 
- enter recipe number via numeric entry number1
- plc logic detects change in number1 value and will ONS pull the data and out and load it into number2
- user can modify if desired and Logic will compare number2 to the existing data If not equal AND verify that the previous ONS is not active then MOV.

Not a bad idea. My issue is using a ONS in Structured text, I’ll have to mess around with it Monday.
 
im trying to incorporate this into a list of tags, which is what it messing me up.

i need to be able to scroll to a tag, read the REAL value in, put that REAL value into the Numeric Entry Write tag, then once that completed allow that REAL tag to be manipulated by the HMI. So i think a one shot will be needed somewhere because the Numeric Entry Write tag cant be constantly written to or else it will never write to the PLC.
 
You have to write the one shot the old fashioned way, there is no native instruction like ladder. But many examples out there, personally, I feel this is one thing all programmers should know how to do. Some platforms don't have one shots even in ladder, so you should know how to do it.
 
I was under the impression that the R_Trig instruction in the Micro800 series controllers was their native ONE SHOT.
 
You can also do it without the ONS:

if Number1 <> Number1_old then
Number2 := Number1;
end_if;

Number1_old := Number1;

thank you. this method combined with the code that i had already had come up with worked just as i needed it to, no One Shot needed.
 

Similar Topics

I am trying to tune a run out old water heating system for the screw of an extruder. I have come to the conclusion that the water flow has simply...
Replies
6
Views
3,373
I can't seem to get the Panel View Plus 7 standard edition to downgrade to V_11, when I check the AB downloads and compatibility websites for this...
Replies
1
Views
95
Hi I used to be able to launch PLCsim without any problem. Now it tells me " STEP 7 Professional Licence is required to simulate this PLC"...
Replies
15
Views
453
Hello! When trying to load the hardware configuration I get error 0050-133 2 2458, check the diagnostic buffer. When checking the buffer, it says...
Replies
4
Views
128
Back
Top Bottom