Micro820 UDT??

PLC Pie Guy

Member
Join Date
Jun 2013
Location
Halifax
Posts
1,144
Good day all.
As promised, I have what is likely the first of a few questions regarding the Micro820.
I have some good material to read from and have browsed through it. (Most of it, the manual is 700+pages).
Now I need to get something started.

I have set my ips, added my plug ins, downloaded the User Defined Function Block and all is well on the hardware side.

I am working on a very simple program. This is to run a glue machine with patterns specific to machine position.
The first thing I need to do is figure out the best way to make a "glue recipe".
If I were using CLX I would simply create an array of a UDT of dints and bools to accomplish what I wish each element of the array with its parameter variables as per its recipe number.
What I am not sure is how to get this started here as I do not have the luxury of a UDT.

This is roughly what I am looking for.

Glue_Rec[1] = Gun_1.Solid (bool)
Gun_1.Spare (bool)
Gun_1.Start_pos_1 (dint)
Gun_1.End_pos_1 (dint)
Gun_1.Start_Pos_2 (dint)
Gun_1.End_pos_2 (dint)
Gun_1.Start_pos_3 (dint)
Gun_1.End_pos_3 (dint)
Gun_1.Solid_Start_pos (dint)
Gun_1.Solid_End_pos (dint)

Like wise for Gun 2

So , question 1 is how can I create a UDT that mimics the structure I have here for Gun_1?

Question 2 is can I create an array of these UDT?

Thanks for any help offered.
 
I think what you want to do is this:

On the bottom of the Project Organizer, go to Data Types/Structures and create your data type with the DINT's and BOOL's (or any other variables) you need for one recipe.

Once that is created, go to Global Variables in the Project Organizer and add an new variable of the type you just created, then in the Dimension column type [0..9] for an array of 10 of your UDT's, [0..19] for an array of twenty and so on.

Also, you don't have to start at 0 if you don't want to. You can have the dimension as [1..10] for an array of 10 UDT's starting at 1.
 
I think what you want to do is this:

On the bottom of the Project Organizer, go to Data Types/Structures and create your data type with the DINT's and BOOL's (or any other variables) you need for one recipe.

Once that is created, go to Global Variables in the Project Organizer and add an new variable of the type you just created, then in the Dimension column type [0..9] for an array of 10 of your UDT's, [0..19] for an array of twenty and so on.

Also, you don't have to start at 0 if you don't want to. You can have the dimension as [1..10] for an array of 10 UDT's starting at 1.

Ok, So I go to Data Types, On the "ARRAYS" tab.
Make a new tag, Here I have to say if its an array of ???, what data type.
Also, should I leave the dimensions as default so that it can be defined in the "Global Variables"?

Sorry for the silly questions but I just don't see it yet. If I understand this correctly, we are trying to create an array of a data type that is not yet created in the tag table?
 
I have another question for anybody interested.

I am seeing that there is a recipe feature in the HMI and the controller. What differentiates between the two. I would expect that creating a recipe in the HMI Recipe tab would make that recipe then visible in the Controller Recipe tab. Not the case.
How are these recipe schemes linked together? Do I have a limit of 10 recipes in the HMI like I do in the controller?

Thanks
 
Not quite:

Got to Data Types, and then the STRUCTURES tab to create your recipe UDT. Then go to the Global Variables and add a tag of the Data Type you just created and dimension it appropriately.

Attached are some pictures. The first shows the Structure where the UDT was created. The Data Type is AA_TEST_RECIPE. The second is an array I created of that data type which is named AA_RECIPE and has a dimension of [0..10].

Recipe_Structure.JPG Recipe_Tags.JPG
 
I see. You are setting that up exactly the way I wanted to. However, my screen looks just a bit different than yours.
I do not have a tab called "Structures". Only Arrays, and Defined Words.

Thank you
 
That's probably due to either a version difference or that I am running the Developer edition and you have the free standard edition.
 
I am using version 9.
I am using the free version of CCW, I guess that means that in the free version you can't create a UDT. That's a royal pain. Would explain why I am having such a hard time creating one.

Thanks
 
I think you have up to 50 recipes in the HMI, but I have not done recipes with either the HMI or the Micro yet as I have only used them with PV+ and 3rd party HMI's. Those recipes were all done in the HMI's.
 
Recipes Amount

On the Micro controller you can create a maximum of 10 recipes with 50 variations each, which means, you have a lot of room for recipes. On the HMI you can create a maximum of 50 recipes.
 

Similar Topics

I’m trying to read values from a device that can either send registers as 32 bit or a pair of 16 bit but if I understand right, the micro can only...
Replies
26
Views
814
Hello, I set up my Micro820 with a basic mapping. When I try to run a script to read the addresses I get errors for illegal addresses...
Replies
2
Views
169
Hi Guys, I am a new member and this is my first post! I have a little PLC experience but it is mostly with siemens logo and using ladder...
Replies
4
Views
902
Hello, I am using a AB Micro820 PLC, via the SD card I want to update the PLC program (not FW). First I created a text file on the SD card with...
Replies
2
Views
296
Hi New to PLCs, up until now I have played with smart relays and the siemens S7-1200 line with TIA. I am trying to get a AB Micro820 to talk to...
Replies
0
Views
305
Back
Top Bottom