marcinmrag

sysmac studio using data from HMI recipie in NJ controller project

14 posts in this topic

Hello,

How I can get acess for the data from HMI recipies in my controller project? Can someone explain me this in the easy way :)

Share this post


Link to post
Share on other sites

Not sure how you would like to access it but have a look at the last post in this thread. There is a video that explains how to use MS Excel to view and modify the data.

 

Share this post


Link to post
Share on other sites

You write recipe data from the HMI to the PLC using a script or the factory created library of toolbar buttons on the HMI.  

As for editing recipes, you can do that right in the HMI project in Studio.

Share this post


Link to post
Share on other sites

ok but how can i have a access in PLC controller project to this values? For example i set from HMI some value in one parameter and I would like to use this parameter in PLC logic.

Share this post


Link to post
Share on other sites

You use the functions in the HMI to write the values of a recipe record to the PLC.  There's a function called WriteRecipeToController you can use in script, or the factory created Standard IAG library has buttons you can add to your screen to do it.

 

Share this post


Link to post
Share on other sites

OK this i have done. But how I can read this from the PLC project? I need to use some function? Or is written with some variable?

Share this post


Link to post
Share on other sites

You cannot read it from the PLC.  The recipe is in the HMI, and from the HMI, you can write it to the PLC or read it from the PLC.  You can't control the recipe from the controller side, that's not what recipes are for.

Share this post


Link to post
Share on other sites

If I get it right, he wants to create new recipe without reprogramming the NA from Sysmac Studio.

If that's the case you can use the AddNewRecipe function from the VB Code. It will generate a recipe with the current content of Variables you mapped to the HMI Recipe and you can give it a unique name. The new recipe will be saved on HMI Memory the same as if you add it from the HMI program.

Share this post


Link to post
Share on other sites

Sounded to me like he wants to write recipes in the HMI from the PLC code.  That can't be done.  Maybe the original poster can clear up the confusion.

Share this post


Link to post
Share on other sites

NO no. I want to use values from recipe in PLC. For example I have some position valve which i set in recipe and I use this value in PLC for correct positioning. So my question is how i can get this value in PLC program?

Share this post


Link to post
Share on other sites

And we answered that multiple times.  You write recipe to controller.

Share this post


Link to post
Share on other sites

I know that is write to controller. But how i can use it in plc program? There is no any recipie tab.. It will show in I/O Map? Is store in some memory? I do not know how this works in Omron plc

Share this post


Link to post
Share on other sites
2 hours ago, marcinmrag said:

I know that is write to controller. But how i can use it in plc program? There is no any recipie tab.. It will show in I/O Map? Is store in some memory? I do not know how this works in Omron plc

You should try to create a Sysmac Studio project with a PLC (either NJ / NX1) and an NA HMI in the same project. You will notice that Global Variables that you make in the NJ controller can be mapped to the NA (see Variable Mapping section in the NA part).

And you should also try to create a Recipe in the NA project. When you're asked for the Ingredients, basically you need to put variables that will be used to fetch data from the Recipe. Typically this will be using variables that is previously mapped to the Controller, so that it can be used inside the PLC program.

In order to fetch the values, you need to call WriteRecipeToController function by Visual Basic Code in NA.

1 person likes this

Share this post


Link to post
Share on other sites

OK thx now is clear. SO i need to creat variable INT in plc than mapping this with the variable name from racipe tamplate

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