RSLogix 5000 instruction help needed

SilverLoop

Member
Join Date
Oct 2002
Posts
87
how would i go about writing a string value to a tag of string type?

i would to write something like "Auto Mode" to a tag called Operating_Mode that is of type String.
 
Create an array of type string which contains all of the strings which you may want to write to the destination tag. Use the string instructions DELETE, INSERT, CONCAT to construct the destination string from the string withing the array.
 
Just to help conceptually - we are used to being able to MOV a numeric constant into a regsiter (MOV, 10, NumberHolder). You can't do that with a string. As Alaric noted you must set up the strings into string variables at program creation time. Alaric suggests a string array. This is for strings known at program creation. Others of course may be received at run time from HMI or other communication operations.
 
I would like to take this a little further....

On the HMI, I would like to edit a name. (a string). Then, I would like to select a recipe from a list. The numbers are obviously no problem to "move", but how do I display the name that I have changed via the HMI?

CompactLogix L32 controller
PanelViewPlus 1250 (touch only)
Ethernet comm

So basically, my question is "How do you move a string?" Does it have anything to do with STOD & DTOS?
 
I'm not sure if this is what you are asking but ... we attach a name of a recipe to each recipe. A UDT is constructed to contain all the recipe components plus a string for the name. We create an array of the UDT type for the recipe storage. We also create a single instance, "Current_Recipe". All running/editing is done using the current recipe. If the current recipe is edited it can be saved using a "Current Recipe Number" as an index.
 
Bernie, thanks for the speedy reply.

Ignoring the recipe part, is there an easy way to move a string? A string that is not predefined. A string that can be edited.
 
Move a string form where to where? If inside the PLC it's a simple COPy command. You must have created the string tag itself but, at program creation time, you don't have to put anything in it. To edit it at runtime just create a text entry control pointing to that string tag.
 

Similar Topics

Hey guys, thanks for taking the time to look into my question. I'm building a system to monitor several other systems for faults and one of the...
Replies
17
Views
4,638
I"m trying to average an array of DINT's called FIFO_ARRAY. It has 1000 elements in it. Here is what I have entered into the AVE instruction...
Replies
11
Views
4,728
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,764
Hi There, When i did FRD instruction in SLC 500 its working, when i try to simulate in RSLogix 5000 same way as i did in SLC 500 which is not...
Replies
14
Views
2,728
This is a real simple interface problem. Typically when I'm developing in ladder I will Ctrl+C an instruction and Ctrl+V, the new instruction will...
Replies
2
Views
1,676
Back
Top Bottom