S7 UDT question...

Thanks TU,

I managed to replicate the 'calls' in FB2 by right-clicking on the network and inserting an empty box and then addressing it as per the variable declaration table...

Thanks for all your help...

I'm getting there.... very slowly but I'm getting there.....

;-)
 
Typo - Forgot to update the FBZone numbers after the copy/paste. Used arrays purely for ease of copy/pasting.

Corrected project attached:
 
Thanks LD.

Anyone know if its possible to monitor a UDT in the VAT table ?

If so, how? Do you have to directly write the address (eg. DB1.DBX0.0) or can you use symbolic addressing to monitor it? I can't seem to get it to work.

;-)
 
Thanks LD.

Anyone know if its possible to monitor a UDT in the VAT table ?

If so, how? Do you have to directly write the address (eg. DB1.DBX0.0) or can you use symbolic addressing to monitor it? I can't seem to get it to work.

;-)

UDT is not stored data in itself, it is complex datatype. You can monitor same simple datatypes that are contained in your data described by udt.

Think about the naming. UDT = User Defined Datatype.

Think about this. You have memory of type int. Now when you access it the datype tell's what area is accessed from what memory location. Same goes for UDT, it just describes what is contained in some memory location.
 
No, you can only enter the basic data types in a VAT (=max 4 bytes).
You can enter a whole series of similar data though, i.e. 20 INTs, starting from DB10.DBW20.
If you write the symbolic address correctly, it will be accepted.
 
UDT is not stored data in itself, it is complex datatype. You can monitor same simple datatypes that are contained in your data described by udt.

Think about the naming. UDT = User Defined Datatype.

Think about this. You have memory of type int. Now when you access it the datype tell's what area is accessed from what memory location. Same goes for UDT, it just describes what is contained in some memory location.

Thanks TU.

Is it possible to monitor the datatypes that make up a UDT in context though?

ie. To show in a VAT table - Meals.Drinks.Milkshake_Flavour.Chocolate etc ?

Or do you have to find the direct address (i.e. DB1.DBX0.0) and monitor that ?

Thanks

;-)
 
Thanks TU.

Is it possible to monitor the datatypes that make up a UDT in context though?

ie. To show in a VAT table - Meals.Drinks.Milkshake_Flavour.Chocolate etc ?

Or do you have to find the direct address (i.e. DB1.DBX0.0) and monitor that ?

Thanks

;-)

If it is of simple datatype, eg Bool, Int, Dint, etc. I tried to say that but it seems I was not clear enough.
 
One of the advantages of using FBs is that you can call the multiple instances in a loop. This can be done as the parameters are copied to the instance DB.
If you thought you had a foggy brain now, then I'd hate to think what it will be like after following the processing in the following example :)
 
LD,

Really appreciate the example. Thank you. But that's like learning to play guitar by sitting down to watch an Ynqwie Malmsteen concert!

It's far beyond me at the moment although I'm slowly crawling my way towards some form of understanding of at least some of it...

Excuse me while I wipe up this CSF from my collar...

;-)
 

Similar Topics

Hi All, I'm fairly new to Proficy and perhaps the problem is that I'm trying to get it to do some of the same things I'm used to doing with...
Replies
2
Views
3,218
Anyone how knows how many levels deep UDT'a may used. DB1 contains UDT1 UDT contains UDT2 and so on. Same question for Structures. And to make...
Replies
2
Views
1,849
I'm not sure if you guys still remember this project template, I'm reading it. If you can't remember, it's here (Thanks RMA). Q1: I noticed in...
Replies
14
Views
4,261
Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
118
I am trying to copy an array of real numbers into a UDT with a real data type element. I have attached a snip below showing my COP instruction...
Replies
4
Views
207
Back
Top Bottom