String Moves

cashd115

Member
Join Date
Apr 2019
Location
Mt Airy
Posts
2
I am trying to track run time of different pump numbers that i store in a string. Once a new pump is in i want to move that string down into another string. The pump numbers are alphanumerical (ex P22) I am displaying the history of ten pumps on the HMI. How can i move a string into another string in a micrologix 1200 c. or is there a better way to do this? :mad:
 
Welcome to the Forum!

My question would be why use a string to display a number? If it were me, I would assign a separate INT for the run hours of each pump. Then when a new pump comes online, display the hours associated with that pump. Or use a separate numeric display for each pump.


Bubba.
 
i guess i did not explain that well....... i need to index these values because i have over 40 pumps and only tracking ten at a time ex

P22
P34
P17
P56

i need to index all of these (up to 10 strings) to the next string while moving a 0 into the first position i tried cop
 
Use a shift instruction or do it longhand
i.e.
on shift pulse

move n+9
into n+10
Move n+8
into N+9
move n+7
into N+8
and so on
then move 0
into n (or Next Pump number)
 
I would not use a string at all, just an INT of the pump number.


Every instance of a pump display will begin with a "P", so just make the HMI display a "P" in front of a non-zero number.
 
Create another 10 long string array, let's say tempstring. I'll call your first array pumps. Enter using the variable table a '0' into tempstring[0]


Then COP pumps[0] tempstring[1] 9. This is copying the top nine entries into tempstring but one entry down. It leaves the '0' in tempstring[0]


Then COP tempstring[0] pumps[0] 10. This copies all of the tempstring array back to pumps.
 
Last edited:
I would not use a string at all, just an INT of the pump number.


Every instance of a pump display will begin with a "P", so just make the HMI display a "P" in front of a non-zero number.

+1 to this, if P is always present just ignore it and use the numbers. Much easier, use the HMI to insert the P
 

Similar Topics

I am creating a global object in FTView SE 13. I want to have a string read from the PLC and display (in this case the tagname). So lets say...
Replies
4
Views
142
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
406
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
121
As the title says, I'm using CCW with a PV800 (and Micro850). I've made a scheduler in which a user can choose a month, day (1-31), hour (0-23)...
Replies
15
Views
494
Hello, So i managed to read the string coming from control logix and put a string display in PanelView 800. Now I am struggling to do the other...
Replies
1
Views
133
Back
Top Bottom