Indirect addressing with WinCC Flexible

suppaman

Member
Join Date
Mar 2009
Location
Italy
Posts
18
Hello everyone.

I'm having some problem with indirect addressing in WinCC Flexible RT (PC-based)

I've a DB structured as below: an array of 300element of UDT.
The udt consist in two variables:
Code: INT
Description: STRING[30]

So it's something similar to a table.
In this table, i've to do some operation like add elements, sorting by "code", delete and compact, modify.

On the plc side, there's no problem, i've already written all the function that i needed.
The difficult part is on HMI side.

I've to create a page to view the table. But beacause of the amount of the elements, i would like to have a view in a single page of at least 10 (maybe 20 is better) elements, so 2 columns (one for the code, the other for the description) and lets say 10row.
Then, with two button prev and next i can navigate into the DB Table's elements.

As i'm not an expert with indirect addressing and script, the only way i've got the things working it's like below:
I've create 10 fields "code".
Field1 contain variable Code_1, that point to DBxxx.DBW[code_index_01] (with multiplex address mode), Field2 contain Code_2 that point to DBxxx.DBW[code_index_02] and so on..

A default start value of the internal variables code_index_yy is set, so the first time i run the RT i've the indexes pointin g to the first ten elements.
Then when i press "next" button, it runs a script wich simple increments the variables code_index_yy to point to the next ten elements

But in my opinion is not a very elegant solution.
This HMI communicate with 3 different PLCs, each one have its own DB, so i've to repeat the variable for each one...

Maybe anyone of you have other ideas on how to do that? With a different approch maybe?

I've also attached some images, maybe with these it's easy to understand..
Maybe my explanation is not very clear, but i hope you'll understand the problem.

Thanks a lot for your support.

Page.png Script.png Variables.png
 
For this sort of thing I always do it the other way round now - create a single display page for the HMI and resrve a space in the PLC memory for this. I then map the data as required in the PLC - much easier than trying to do it in the HMI and you save a load of tags as well (although I believe that's no longer such a problem with WinCC Flex as it was with ProTool).
 

Similar Topics

Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
577
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
649
Hello Friends, I am trying to index M Bits, however GX Works2 is not allowing it with following message. https://ibb.co/zPcqj6M...
Replies
3
Views
1,297
Hi All, which the best way to do the indirect addressing in an optimize DB? Ccurrently this is my partial code inside an FB...
Replies
7
Views
2,250
Hey everyone, Just used the PLC5/Logix migration utility to convert a program, and while addressing the PCEs, I noticed a lot of errors for "XIC...
Replies
12
Views
1,902
Back
Top Bottom