RSLogix 5000 - References and Pointers

Hi,

I am controlling 10 of the same type of device. I have a UDT that has all the control parameters for 1 device. I then make a tag that holds 10 instances of that UDT.

So for example ControlData[0] is all of the parameters for the first device and ControlData[1] is all of the parameters for the second device, etc.


So on my HMI screen I can have a numerical display that shows ControlData[0].CurrentSpeed , or whatever I like. No problem. The issue is that for larger projects that have 20 or 30 of these devices, I don't want to duplicate 20 or 30 screens.


I want to have a tag that indicates the current axis, and have the one HMI screen display the ControlData for the current axis. So for example I want to display ControlData[CurrentAxis].CurrentSpeed.

I'm using a maple systems HMI, and it doesn't understand the concept of indirect addressing. It has functionality for index registers, but it wont work with my UDT. So what I would have to do is have logic on the PLC to copy the Current Axis Data into a temporary location that the HMI can look at.

So for example Copy ControlData[CurrentAxis].CurrentSpeed to HMI_ControlData.CurrentSpeed every scan, and point my buttons on the screen to HMI_ControlData. That works, but I'm wondering if there is a more elegant solution. My UDT's are very large, and I don't like copying huge amounts of data into temp tags every scan.

I come from the land of computer science, assembly, c, c++, etc. Is there no way that I can have a tag that is a reference to a location in an array?

Regards,

Adam
 
I am not familiar with Maple Systems HMI but i would be surprised if there wasn't a way to pass a parameter into your popup to change your reference. Different systems will have different methods of course. You mentioned something about an index that won't work with your UDT, why doesn't it work?

Can you do any scripting on that HMI? Scripting would be another possible way to do it.

As for your UDT, I'd move to an AOI, that way all of your logic is contained in your AOI (think of this as a custome function block) so that way in your PLC logic you just call the AOI instance for each axis.
 
The maple systems HMI's allow you to specify an index register if the tag you are looking at is an array of DINTs , INT's, or REAL's.

It does not allow you specify an index register if the tag you are looking at is an array of a UDT.

Scripting on the HMI may be an option, but I was hoping to avoid that. I think there would be resistance to using that option from my colleagues.

I was really hoping to do this on the PLC side, but without having to copy data into temporary locations every scan.

Regards,

Adam
 
Here is a suggestion:

Selectively copy a part of your ControlData using HMI navigation buttons.

For the sake of discussion, lets say you have 50 of these things, so you have ControlData[0] to [49].

Let's say that based on the amount of data you have for each device and how it makes sense to display it, let's say that you will display only two of these devices per page. We can display all 50 devices on this one display and have the PLC do all the work.

Create a tag that is just like your ControlData tag (same UDT) and make it only two elements long. Call it "DisplayData" So you'll have DisplayData[0] and DisplayData[1].

On the HMI create your display objects (strings, numbers) and tie them all to the DisplayData tags. So all of your HMI objects are tied to either DisplayData[0] or DisplayData[1].

Let's say you want to view your first two devices on the HMI. You would copy ControlData[0] to DisplayData[0], Length = 2. Right?

Now add an Index control the copy command. Instead of the source being ControlData[0], make it ControlData[Index].

Now add Page up / Page Down buttons and/or Jump to Top, Jump to Bottom, etc and change the value of the Index. Use a display object that is linked to your Index value to indicate which elements of the ControlData tag you are looking at.

If you don't want to execute the copy command each scan, then just embed the copy instruction so that it's only executed when a button is pushed on the HMI. But you are only copying one screens worth of tags at any time, so I'm not sure it would be that big of a deal to just let the COP instructions run. It would be easy to check to see if there is an impact on scan time.
 

Similar Topics

Is there any form of Reference Type or Pointer Type like Codesys has? I am aware that you can nut a tag in the index of an array reference. but...
7
Replies
3,432
Views
Does anyone know if it is possible to save your preferences (display options, hot key assignments, etc.) so that you can move them to another...
2
Replies
2,976
Views
Bit of a weird one here maybe. One thing that may be relevant(?) Doing this on a non-activated copy of RSLogix while waiting for the activation...
8
Replies
294
Views
Hello, I am trying to view the Module Properties for my IF8 and OF8 analog cards in RSLogix 5000 / Studio 5000. However, when I click on either...
6
Replies
398
Views
I am sure someone has maybe done this before. I have a FactoryTalk ME application on one VM, and my PLC program on a different VM. Is it...
5
Replies
447
Views
Top