_Pavel_

NA integer state to string indication

17 posts in this topic

Dear Colleagues,

working with NA, can't find the following, very common to all HMIs feature: got Var1:INT within PLC. On the HMI want to create a string list (like 0= Sunday, 1 = Monday , 2 = Tuesday etc.) and have a respective string on the HMI changing depending on Var1 vaue.

How do I do that?

Thank you!

 

Share this post


Link to post
Share on other sites

Drop down list or Listbox works fine for this.

Share this post


Link to post
Share on other sites

Working with NA is like, some things that used to be hard become simple, but some things that used to be simple become hard instead.
I believe you want to produce something like a Word Lamp in a usual HMI, where an integer value represent a state, and on each state you can register different Text / image.

NA doesn't incorporate such intuitive design method anymore. Instead you have to assign an internal String variable in the NA on your DataDisplay or any object with Text you need.
You also need to map the Integer variable from NJ to the NA.
After that you need to use Visual Basic codes to change the value of the text.

I usually create a Global Event with type of Interval, which will Call a Global Subroutine.
In the Global Subroutine you make a Select Case statement which will check the current value of the integer. On each possible value you assign a new value to the String variable.

Share this post


Link to post
Share on other sites

Thank you, guys!

Listbox unfortunately doesn't let to change the layout, and always grey when disabled, and always has frame and scrolls, so I couldn't use ut

Created Global Subroutine acc to innoaloe's tip - thanks! Also this lets to change the color of string - which is also needed

Also checked with creating auxiliary string variable inside PLC - works good as well

PS

My question was mainly because I just couldn't believe this feature is absent. Thought I just couldn't find it, but.... (( But it was lack of this feature on NS as well and same appears with NA...

I like NB Omron panels. Consider them just as "normal", all common features are presented, price is pretty good. The only restriction - 10" is the max. Just pity! Only due to this I just HAD to use NA. NA is VERY expensive and yet VERY inconvenient for me. Same were NS panels for me - expensive and inconvenient.

Edited by _Pavel_

Share this post


Link to post
Share on other sites

I still; use the NS series - much better than the NB but more expensive. Have resisted using the NA!

Share this post


Link to post
Share on other sites

NA does have a control for this although it's not very intuitive. Much like the NS would use a String Table, the NA has a section called Resources. Here you would assign Text to a Resource ID. Then using a Label, you would change the Resource Link Type to Dynamic and assign an Expression to reference the Resource & Index.

MrPLC_NA_Resource1.jpg.13212b8b1d4851fea

MrPLC_NA_Resource2.jpg.195b2cd1e3db809c2

Share this post


Link to post
Share on other sites
40 minutes ago, IO_Rack said:

NA does have a control for this although it's not very intuitive. Much like the NS would use a String Table, the NA has a section called Resources. Here you would assign Text to a Resource ID. Then using a Label, you would change the Resource Link Type to Dynamic and assign an Expression to reference the Resource & Index.

Thanks very much @IO_Rack, this will certainly make things more easier. The Resource table can be made easily using Excel also.

Sysmac still got a long way to go I'd say. Dev team seems kind of overlooking NA, compared to safety and motion components that's growing fast and steady. NA manuals especially is not well documented even though it has a lot of possibilities compared to NS/NB. And the price is meh... :shrug:

Share this post


Link to post
Share on other sites
Just now, innoaloe said:

Sysmac still got a long way to go I'd say.

I agree.

When I first started using the NA, I found myself writing scripts for almost everything because the built in controls didn't do exactly what I wanted. The possibilities and the flexibility is certainly there using the Dot Net although I try not to use it when I can manage it. The forum members here have been a great help in using the HMI controls. We also have good Omron support people here in the US.

 

Share this post


Link to post
Share on other sites

IO_Rack, thank you! I would never find this out by myself )

Share this post


Link to post
Share on other sites

You're welcome. I would not have discovered it myself except I was fortunate enough to have some time to just play around with the NA on my last project. I believe I found it at www.myomron.com.

On ‎8‎/‎23‎/‎2017 at 2:50 PM, _Pavel_ said:

My question was mainly because I just couldn't believe this feature is absent. Thought I just couldn't find it, but.... (( But it was lack of this feature on NS as well and same appears with NA...

In case you use the NS in the future, This function is available on the NS as well. There is a check box, "Use as a Message Display" on the General Tab of a Label.

Share this post


Link to post
Share on other sites

Another question regarding NA + SysMac Studio

Is there any way to run NA simulation in SysMac Studio so that simulated NA connects to the real PLC?

 I've only found the mode where simulated NA connects to the simulated PLC, and this works. But how do I connect the simulated NA to a real PLC? Again, this is a common feature to all the HMI editors. CX-Designer supported this with NSs, and NB-Designer supported this with NBs. But here I can't fInd it.

Thanx.

Edited by _Pavel_

Share this post


Link to post
Share on other sites
18 hours ago, _Pavel_ said:

Another question regarding NA + SysMac Studio

Is there any way to run NA simulation in SysMac Studio so that simulated NA connects to the real PLC?

 I've only found the mode where simulated NA connects to the simulated PLC, and this works. But how do I connect the simulated NA to a real PLC? Again, this is a common feature to all the HMI editors. CX-Designer supported this with NSs, and NB-Designer supported this with NBs. But here I can't fInd it.

Thanx.

Nope... no way to do that on the current NA.

I don't know if any manual states that, but it clearly presented here : https://www.youtube.com/watch?v=8WrxdejO2fI

Share this post


Link to post
Share on other sites

Simulator is for testing the HMI, not for using as a live interface to a PLC.

NA Runtime will give us that in the near future.

Share this post


Link to post
Share on other sites
On 9/12/2017 at 8:33 PM, Crossbow said:

Simulator is for testing the HMI, not for using as a live interface to a PLC.

As I have noted, I know no other HMI designing environment not having this function. This helps greatly while debugging HMI interface. This saves a thousand of downloads to HMI. And this allows to bring the virtual HMI (notebook) to any part of a machine, which helps greatly while commissioning.

On 9/12/2017 at 8:33 PM, Crossbow said:

NA Runtime will give us that in the near future.

Good )

Share this post


Link to post
Share on other sites

Actually I have worked with numerous HMI products in my 20 years of this that do not communicate to a real PLC with their simulation.

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