Jump to content

How to create a pop up warning message


Recommended Posts

This is probably not possible without changing the screen.

However, I usually select a place at the top or bottom of the screen - where with the help of a list of pictures or a list of texts i  implement tips for the operator.

If this tips are not active then this place either has a background color or is hidden by the Hide command. It's fast and convenient.

Link to comment
Share on other sites

Or, if you have room on your screen,  you can make a binary text button that only shows under a certain condition.

Either make one of its states the same color as your background,  with no text.

or I believe you can link an operand to Hide or Disable View....

But again, it has to fit within your screen, it cannot pop-up over other display elements

Link to comment
Share on other sites

Actually, there is a way to have a psuedo-popup window. 

It's done using a little-known and poorly documented system bit - SB 25 - "Do not draw display background".  I used this for the PID tuning window on an oven project.

I used a V1210.  Here's the display with all the loops called "Setup" called from another screen.  Pressing any one of the "Tune" buttons set a different bit in an array:

image.png.921180ca1989f4f54a64a5830e130e44.png

I have code that watches for one of bits to go on and call this rung:

image.png.def06cb7c568ad17d3aebb2e8ad8dd8e.png

You will notice that the description from Unitronics for this bit is flat-out wrong.  The actual operation can be found in the Help if you search for "SB 25" (include quotes).

Which pops this display without drawing the background-

image.png.99baff887a2f97ec21fb7c1b205ed4b2.png

Giving this-

image.png.3c56a10a0ca882e1b4333de58d3fabfc.png

 

Note the PID Tune is now the active window and is modal - nothing on the Setup screen will respond because it's not active.  I have code that uses pointers to interact with the variables on the Tuning display that is not important for this discussion, but leaving the tuning display is simple:

image.png.6368e22b522ccb6d939c0fd01f4c47ad.png

 

By calling the Setup display again without SB 25 set it just blows out whatever display is there, which is normal behavior.

@Patrick - I would not call this "simple" in UnitronicsLand and the suggestion of others to just call another nearly identical display is what I would normally do.  I used it in this application because I needed a way to indirectly interact with a window instead of creating 22 slightly different instances of the same thing.

 

 

Joe T.

 

  • Like 3
Link to comment
Share on other sites

OK Joe, I have to ask about your great solution!  All my searches (including manual looking in the help file itself on it's own)  only bring up the incorrect reference.  In my help files it actually only shows under "HMI Display tasks, SBs 26-34, which you naturally skip if looking for 25!

Perhaps latest help files have it?  Mine are derived from 9.8.65.  Could you please put up a scrnshot and also where specifically you found it.   🧐

cheers, Aus

Link to comment
Share on other sites

@kratmel - Nice find on a 10 year old post!

@Ausman - Search "SB 25" in quotes.  Only one find - Color Vision series.  On the bottom of that page you have to expand System Operands-

image.png.6edd612e74182c34f8906d7dff5c95b8.png

 

As described in the post kratmel found, Unitronics thinks this bit is no longer needed so they probably forgot about it.  It's not like they don't have enough other things on their plate in R&D.  I'm glad Patrick asked the question, as it triggered my memory.

Joe T.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...