Jump to content

Recommended Posts

Posted (edited)

Hi all, some guidance please.

I am displaying text labels on a V1210 screen

I have a common block of MIs that I use to display the various string labels (Tank names, Pump names, Product names).

The labels vary in length (eg: Tank = 6 characters in 3 MIs, product = 20 characters in 10 MIs)

The Tank screen displays 40 x 6-char labels and the Product screen displays 20 x 20-char labels (please see display export).

After initialising label length and number of labels I use a common net to display 1 label per cycle (see attached net).

The net reads a table and copies the data to the MI offset for the current record number. Each screen label is mapped to its associated offset of the common block.

When displaying the Product screen only (20-character) 11 labels are displayed  and when displaying the Tank screen only the first 20 plus  the 33rd labels are displayed (3-characters).

When the screen is only showing around half the labels, if I manually set SB31 (refresh variable) (ie via the Visilogic connection to the PLC) then all labels suddenly appear. Also if I touch any label and the HMI keyboard appears, either ENTER or ESC also causes all the  labels to appear. However if I try to set 31 programmatically in the NET when all labels have been displayed, it does not update the display.

Final note, after all labels have been loaded and half not showing, looking at the live data via Visilogic shows the MI block for the screen labels is fully populated with the correct data.

So it seems to be a refresh issue but I am snookered as to what it is..

 

Any thoughts from anyone?

Thanks

Mal

Tank Edit 20181007a.bmp

Load Rung.PNG

Edited by MalSnaize
noticed addional behaviour now documented
  • MVP 2023
Posted

Are you triggering the Refresh bit associated with the specific string display text object?

image.png.b8c35c9e4bacb5d160c840b5730ab359.png

You may need a separate bit for each one.  Post your code if it would help.

Joe T.

  • Like 1
Posted

Joe thanks for your rapid response and apologies for my slow one - I'm in a different time zone.

Ah ok so I have been a bit lazy here and used the same trigger bit on all objects - I'll assign unique ones for each and see how that goes; back soon!

 

cheers Mal

  • Like 1
Posted

Hi Again Joe - worked a treat thanks - the table now displays nice and smoothly too

At the moment I trigger on each cycle  for each label as the table of text is built; I wonder would it be better (or indeed worse) to build  all of the data and then write all the triggers at once?

Just a thought.

Posted

Thanks Gabriel - yes I too previously used one bit to trigger a number of text fields.

The problem arose when I increased the number of text fields significantly (one screen has 16 x 20 character fields plus a whole load of  static information. The other screen has 40 fields of 6 characters. So I'm thinking maybe theres a limit to how much data can be refershed in one scan (has to be, right?)

Supporting that, following Joe's advice and introducing individual trigger bits it has fixed the issue - I guess the OS simply looks after it nd determins how much it can referesh in one cycle then comes and finishes off the rest in subsequent cycles (thats just a guess)

anyway end of the story is that it now works!

 

thanks all

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.