Solving Indirect Addressing Challenges in FactoryTalk View 13

Question:

I am using an HMI designed in FactoryTalk View 13 to communicate with a PLC. The PLC program contains an array of 1000 elements of the RejectReg data type, consisting of fields such as Weight (REAL), High (BOOL), Low (BOOL), and DateTime (DINT(7)). The challenge I am facing is that the HMI currently references the fields of this array using cumbersome addressing like {#1}, {#2}, etc. To simplify this process, I have introduced a variable called HMI_Indice_Buffer, which increments by 1 to create an arithmetic series for accessing the array fields. The issue arises when attempting to connect this variable in an expression like {#{1+{HMI_Indice_Buffer}}}, as it does not produce the desired results. I have experimented with various combinations to no avail. I would appreciate any assistance in resolving this matter. Thank you.

Top Replies

In need of assistance; seeking help urgently!

Is indirect addressing possible in PLCs? I personally find it to be a more convenient option.

Upgrade your studio setup with the cutting-edge IO Rack +, designed to enhance your audio recording and playback experience.

I understand your predicament and I appreciate the efforts you've made to solve the problem. Now, I'm not sure if FactoryTalk View supports such complex expressions. Variable indexes might not be supported in FTView which could be why you're not getting the expected results. While direct addressing is admittedly cumbersome, it could be that it is the only option in this case. You might want to consider consulting Rockwell's documentation or their tech support for a definitive answer on this. They've helped me with a few tricky cases before, too.

It seems like you're on the right track thinking in terms of indexing to simplify your process; however, directly using the variable in an addressed expression like that might not get recognized by the HMI. FactoryTalk View uses a unique syntax when working with tags and in your case, it likely doesn't support data type manipulations within the tag address field. Instead, try to handle buffer manipulations and calculations within the PLC program. You can create a new array pointer in the PLC that uses your HMI_Indice_Buffer to indicate the current index. Make this pointer reference the current structure in your data type array; then, you can refer to a fixed address in your HMI (by binding the pointer's fields to HMI elements). Thus, you would only need to update the PLC index to access different records.

It sounds like you're on the right track with using a variable to dynamically reference the fields in your array, but it seems like FactoryTalk View might not be handling the nested interpolation in the way you're expecting. I would suggest trying a different approach. Instead of using inline arithmetic, have you tried updating your `HMI_Indice_Buffer` variable directly within your PLC program to reflect the desired array index, before it gets to the HMI? This way, your HMI would only need to reference `{#{HMI_Indice_Buffer}}`, simplifying the expression and potentially solving your issue. Remember, it's often best to pre-calculate complex addressing in PLC to simplify HMI side expressions.

It sounds like you're on the right track with your approach to simplify addressing elements in your array! One way to improve your expression might be to use the `ToUInt` function to ensure the arithmetic evaluates correctly. For example, you could try using `{#1 + ToUInt({HMI_Indice_Buffer})}` instead of the original expression. This should help to produce the correct index as you increment the buffer. Also, make sure that HMI_Indice_Buffer is being updated properly and that its value stays within the bounds of your array to avoid any indexing errors. Let us know how it goes!

It sounds like you're facing a bit of a challenge with the addressing syntax in FactoryTalk View. Instead of using the complex notation you're attempting with the expression, have you tried creating a tag that directly references the array element by using a straightforward index? You might be able to achieve this by creating a new tag that calculates the index outside the HMI expression, then use it to reference your data, like `RejectReg[{HMI_Indice_Buffer}]`. This can help eliminate the complications with the arithmetic inside the brackets and keep your code cleaner. Just be sure to check that your indexing isn't exceeding the bounds of the array!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. How can I simplify addressing an array in FactoryTalk View 13 when communicating with a PLC?

Answer: Answer: You can simplify array addressing by using an arithmetic series approach with a variable like HMI_Indice_Buffer to access array fields more efficiently.

FAQ: 2. Why is the expression {{1+{HMI_Indice_Buffer}}} not producing the desired results when connecting a variable in FactoryTalk View 13?

Answer: Answer: The expression {{1+{HMI_Indice_Buffer}}} may not work as expected due to syntax or evaluation issues. Experiment with different combinations or consider alternative methods for achieving the desired results.

FAQ: 3. How can I effectively address fields within an array of the RejectReg data type in FactoryTalk View 13 without using cumbersome addressing like {1}, {2}, etc.?

Answer: Answer: You can enhance addressing efficiency by implementing a systematic approach with a variable that increments to access the array fields, thus streamlining the process and improving clarity in your HMI design.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’