AB Command to Copy a Tag Address

Chunkchunks

Member
Join Date
Feb 2013
Location
Guelph
Posts
3
Hello everyone,
I spent the last few days searching for a solution to my current problem but have yet been successful. I am hoping that maybe someone here will be able to possibly help me find a solution or possibly point me in the correct direction to where I should be looking.
We are using Rslogix 5000 and trying to find a way to copy the name of a tag address and move it into a destination. Basically if I have a descriptive tag name (Example: OPERATION10_CYCLE_TIME), I want to copy that address name into a string and store it in a destination (possibly an array). The purpose of this is that this array will later be uploaded onto one of our SQL servers. We currently are using FactoryTalk Transaction Manager and have no problems when uploading information to our servers. The problem is that we link each tag separately and our projects have grown so large that some of these transactions are starting to require hundreds of connections. Without going into too much detail, I am basically trying to create a set of code that will be a dynamic way of identifying what information is being sent along with the value.
Example: Current method
OPERATION10_CYCLE_TIME.Value à Link to Transaction Manager à SQL Stored Procedure
OPERATION20_CYCLE_TIME.Value à Link to Transaction Manager à SQL Stored Procedure
OPERATION30_CYCLE_TIME.Value à Link to Transaction Manager à SQL Stored Procedure
Example: Future method
OPERATION10_CYCLE_TIME.Value à
OPERATION20_CYCLE_TIME.Value à Dynamic Link To Transaction Manager
OPERATION30_CYCLE_TIME.Value à
I need a solution where I can take whichever tag I would like (Ex: OPERATION10_CYCLE_TIME.Value). Have a command that copy’s the tags name and stores it as a string in a new bit. Essentially I would have a dynamic bit that looks like this:
FileSendToSql.File_Name & FileSendToSql.Value
Where the File_name will store either OPERATION10, OPERATION20, or OPERATION30 names along with the value associated to the name in .value.
The question is, is there a command that can identify the name of a tag and copy it into a string? If not, is there a possibility of programming a command that does such a thing?
Thank You in advance,
 
The human-readable tag names in a Logix family controller are actually resolved to a 32-bit hex name that is the "true name" of the tag that's used internally by the controller's OS. That's why you can change the human-readable Tag Name online during runtime. You can see these if you export an RSLogix 5000 program as a *.L5K text file.

The tag database includes the tag name and the 32-bit identifier, and the data type and the data value. This is well protected by RSLogix 5000 and is transparent to the user.

I know that there is a CIP Message you can send to the controller (in ladder logic, it's valid to send a message to yourself) that returns the Tag Name as a short string. But it's been a long while since I fiddled with it, and it was not public information.

You'll have to work closely with RA Tech Support and probably also the Commercial Engineering team if you want to implement an application that uses this feature.
 
If I understand what you're trying to accomplish...

Don't expect too much help from Rockwell on this. You're basically trying to subvert the licensing scheme for Transaction Manager.
 
Couldn't you create a STRING[Array] which contains your tag names. Then populate FileToSendToSend with
(STRING[Index number].Value)

or

If the FileSendToSql.File_Name & FileSendToSql.Value Is a string you could create an additional STRING [Array] to contain your (.Value) and any others needed. Then Use the Concat Instruction to concatenate the 2 Strings and place in a Command String to Use.

Disclosure, I have not used Transaction Manager and I'm not familar with it's operation. Just going off your post and comments.

Not to metion you have recieved info from the "EF. Hutton" of this forum. When Ken talks we all Listen.
 
I'd be inclined to agree with cwal61 -

Create array of strings with the tag names, then assuming your .value is a number use a dtos or rtos to change to another array of strings and use the one pointer to concat them into your FileToSend. or if your sending the value as number create array of DINT/REAL which will copy the corresponding value into to correct position and use same pointer[x] to send name[x] and value[x]

That's how I'd do it anyway!!
 
If I understand what you're trying to accomplish...

Don't expect too much help from Rockwell on this. You're basically trying to subvert the licensing scheme for Transaction Manager.

I apologies for the lack of detail in my first post, I tried to keep it as short as possible to avoid losing users/readers in the wave of information.

No the point isn’t to subvert the licensing scheme for Transaction Manager. The point of the exercise is to find a solution to take a more dynamic approach on how we transfer information from our systems to our databases. The fact is if I really wanted to reduce the amount of tags and subvert from the licensing scheme, I would program our systems to use an X amount of connections and populate the entire database by pushing all my information through those connections. I am looking for a solution to identify the name of a tag that information is being sent to and copy that tag name to another array. If found, this solution can theoretically make the lives of all my programmers much easier as well as make our system more reliable and durable.

Maybe an easier example of what I am trying to achieve is.
1) A value has been inserted into Tag à OPERATION10_CYCLE_TIME.Value
2) I would like to make a dynamic command that is able to read that tag name and store it in an array.
3) From this array I can derive that I populated Tag (X) with Value (Y) and Time (Z)

Couldn't you create a STRING[Array] which contains your tag names. Then populate FileToSendToSend with
(STRING[Index number].Value)

or

If the FileSendToSql.File_Name & FileSendToSql.Value Is a string you could create an additional STRING [Array] to contain your (.Value) and any others needed. Then Use the Concat Instruction to concatenate the 2 Strings and place in a Command String to Use.

This is very similar to the solution what we are currently doing. The unfortunate part is that we are manufacturing parts that are collecting anywhere between 200-300 nodes of data at any given time. The amount of time it requires to program separate arrays for each process and then each line has becomes a very inefficient way to code/program. Instead of reprogramming a separate array for each process, I should be able to use the tag names that contain the information they already store, not to mention that these additional arrays are a waste of memory.

Ps. I appreciate all the time and responses from this community so far, Thanks again.
 
Then I would look at the FSC instruction (File Search and Compare) populate a storage array of last info sent and compare to current array and use the .FD bit will notify you of changes and .POS will tell where it is in the array. If all your operations are simular then once you get a workable solution then turn that into an AOI then your programmers only have to populate the inputs and outputs of the AOI.
 

Similar Topics

This is a gross over-simplification of my goal, but it makes the point... 1. I have registers N7:0 through N7:9 on a Micrologix 1200. 2. I...
Replies
9
Views
4,495
Sigh, DeviceNet noob... I have a 1756-L55, with a DeviceNet module, and 10 PF700 all commanded with DeviceNet. One of the PF700's blew up...
Replies
3
Views
127
Hello guys, I am new to this forum and have some problems with my PowerFlex755 EENET frequency inverter. I want to do a point to point...
Replies
9
Views
377
I have an issue with Power Flex 525 during running processing, the VFD stopped suddenly while the PLC and VFD connection ok, VFD does not have any...
Replies
1
Views
106
Hi, I have been trying to run drive via Sysmac studio. I can ping the drive. I can see the logic bits going on/off as per command. But, drive is...
Replies
21
Views
541
Back
Top Bottom