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

Hello, I have recently been having trouble assigning a string tag to some characters in rs logix 5000. I initially though you could just do...
Replies
3
Views
89
Hello everyone, Wondering if anybody can help me with this: I have a CompactLogix processor running a little robot cell. Every 200 cycles...
Replies
8
Views
165
All, I am trying to reset timers when a Work Order change occurs. The Work Order comes in as a string and I am comparing it to a tag...
Replies
2
Views
115
Hello, I am using studio 5000 pro and am trying to figure out the structured text. Here's my scenario: An operator scans a barcode, the barcode...
Replies
15
Views
353
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
205
Back
Top Bottom