lamboom

Omron NA HMI "Page" Global Variable? RESOLVED

10 posts in this topic

Hi.. an easy question.. which I can't find an answer too .. in the 2 manuals:  V421 and V422 ...:

"Can you make a variable that goes TRUE when a particular page is selected, and "live" on the HMI screen?"

Yes, it's easy to map NJ variables to the objects on the HMI pages...  Yet, It's not clear how to create a variable for a "specific page".. so it is TRUE when that page is on screen.

I'll keep looking .. and post what I find, in case no one posts the answer ... thanks   Regards, Michael

Edited by lamboom

Share this post


Link to post
Share on other sites

You can make any variable you want in the HMI's global variables list.  And you can use a script to turn on and off when a page is displayed.  There's no 'automatic' variable that turns on.

You also get a register to store the current page number, that can be used to change pages by number by changing that value.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks Crossbow .. I remember reading something like that .. You have to map page numbers 0.1.2...  to the page names ..  It wasn't real clear how that would help do what I wanted.    But, that idea of a "script" that turns on and off looks good...  I'll research Scripts in those manuals...

I'm looking for a way to set values or binary states to variables, depending on what "Page" was displayed on the HMI ...

As an example, when I input values on a page like "wave height", and it might be in feet,  There would be another data display object (on the same page) that indicates the height in millimeters; however, that display in mm, would be based on a "Scale" factor.... like 1/200  or 200.   "Scale" would also be a data input on this, or other HMI page.    I would like the data displays to be "live" .. so that when a scale and a wave height is input as data, the wave height in mm, is displayed.    No axis program is running yet.  The HMI page is live for inputting and displaying variable data; but the CPU isn't doing any servo controlling ...

I need a way to display variables that are calculated from inputted variables.  I need a small program to go live when a page is displayed, and always be calculating, and displaying different variables on the same page.         Basically, you input something, and other data displays on the same page, change in response.   Because, they mathematically depend upon the values of the variables you inputted.

I would like to see them, before running the axis.  

 

Edited by lamboom

Share this post


Link to post
Share on other sites
On 7/26/2017 at 6:58 AM, Crossbow said:

You can make any variable you want in the HMI's global variables list.  And you can use a script to turn on and off when a page is displayed.  There's no 'automatic' variable that turns on.

You sayin' I would have to use Visual Basic to create a script to make a special variable TRUE  ... hmmmm...  what's the indicator in software, that a particular "page" is "ON, or TRUE ?

(remember I'm a bit of a newbie here.. sorry     FYI.. I did finally figure out the last 2 wave sequences, with some Tsunami help from "Dirt" on PLCs.net

https://www.youtube.com/embed/B0UGm9JTw3U?rel=0

 

Edited by lamboom

Share this post


Link to post
Share on other sites

More Example:

DSC01505.jpg.b14b18a8b9fe3e9bbe0eed14553

I’m going to make a Regular Wave, I input 85mm for a height, and 0.68 seconds for the wave period.  instantly, if something is already in the SCALE data input (200), the Full Scale Height in Feet (55.8), and the Full Scale period (9.62) would be quickly displayed in the data display windows… yet the axes hasn’t run yet  (Start Regular Waves) …   

How can I get these Full Scale data displays to work before the axis is run?     

PS:  You can see that they work fine, after the axis is run …. :-) .. thanks to memory of variable data….

 

Share this post


Link to post
Share on other sites

On Page 8 of NA Practices Guide ..Omron manual V422-E1-01 .. Last question:  "Is it possible to switch the screen from the PLC? Is it also possible to report the current screen from NA to PLC?"     Someone asks  a two question, question, and this is the only answer:

"On the NJ, specify a String-type variable and assign it to “_HMI_CurrentPage”, a system variable that specifies the current screen. You can change the screen by entering the name of the destination screen in the variable assigned to the system variable. If the address values are directly linked with the page numbers as in NS series, you must write Visual Basic".


This answer probably means something to someone who already knows how to do it ... but, it's not much help for me.  I get that you create a String-type variable: select STRING[256] under the Type column.. But, what does it mean to "assign it to this system variable: "_HMI_CurrentPage"  .. the answer seems only to answer the first question, and ignores the second question.. which is the one I'm interested in....  Do you know the answer to the second question?  :-)

PS: I think it's in the NA's Variable Maping .... working on it...

EDIT.... Nope.. nothing there.. that's just for calling pages from the NJ software...   I want to work with input variable data, and display of resulting variable data on that same page; because, the input data creates the output data.  an' I don't want to push some "Equals" button that activates an ST rung.. I want the ST rung to be auto activated by the "existence" of the current page ... "_HMI_CurrentPage"  or something like that....???   Thanks, Micheal

Edited by lamboom

Share this post


Link to post
Share on other sites

OK.... One last way of saying it:

Special_NJ_global Variable := TRUE  when Special NA globalVariable is TRUE  IF "PageName" is _HMI_CurrentPage   ... How hard can it be?  :-)

Yes, I know the above expression is bogus.. but, it makes the point......

 

Edited by lamboom

Share this post


Link to post
Share on other sites

Hi Michael,

Let's say OnPageOn is the Variable name you want to toggle

if you want to make a OnPageOn TRUE when a specific page is opened, you can use the PageDisplayed Page Event, then give the SetVariable Action on the said event to set the OnPageOn to TRUE. Vice versa, when the page is closed and OnPageOn need to be turned FALSE, you can use add another Page Event which is PageHidden then use other SetVariable Action on the said Event (see screenshot)

Capture.JPG.96e1dfccbea6d0152928e1c04a7d

 

Now, on to the Scaling, of the Output Variable, just Map OnPageOn to an NJ variable, and use it for ST calculation triggering condition in the program.

1 person likes this

Share this post


Link to post
Share on other sites

INNO  .. You are awesome...     I just tried writing that program yesterday.  Tyler Corbett (Omron Engineer, Canada) told me about "SetVariable" yesterday.  I can't believe I missed that when I looked over the list of "Actions" in "Events and Actions" ... (I have that same problem when I'm looking for a specific item on a menu ... sigh!)     My first attempt WORKED!    .. I didn't try to make the NJ side variable to go FALSE when the page does away .. you just showed how to do that ..  my first job this morning, with coffee .. :-)      Life truly has meaning

Tyler also presented some good info on going the other way.. where the NJ is controlling the pages on the NA HMI ... Nice!

Share this post


Link to post
Share on other sites

Tyler is a sharp guy, he has a good working knowledge of Sysmac stuff...

Share this post


Link to post
Share on other sites

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