Dynamic Determination of UDT Size

Rusty_K

Member
Join Date
Mar 2004
Location
Norway
Posts
73
Hello,

Does anyone know if it's possible to dynamically determine the size of a defined UDT in Step 7? Any help would be greatly appreciated.

Cheers

R.K.
 
There is one problem with this though.... If you pass a db into a any input at a block the size of the area will be set to 2 bytes!! How exactly would you determine the complete size of the db?


Cheers
Borte
 
Thanks Simon!

I was not aware of that command, but how do you differentiate between the different types of pointers you could have in a "any" input?

Wheter or not the programmer used just DB100 or P#DB100.DBX10.0 BYTE 4??

I know how to sepearate the different types but not how to detect just a db input.

Cheers
Borte
 
An any pointer for blocks has the type byte=19hex.e.g.

CALL FC 594
pPointer:=DB100
NOP 0

then FC594 is as follows (pPointer is an input parameter of type any):

L P##pPointer //values shown in hex
LAR1
L W [AR1,P#0.0] //=1019
L W [AR1,P#2.0] //=1
L W [AR1,P#4.0] //=0
L D [AR1,P#6.0] //=64
 
So then I have to check for type 19h then use the DBLG to find the size of the db?

What does the 64h in byte 6 stand for? I can't find anything about that in the help. Shouldn't it be 2 for byte?
 
Borte said:
So then I have to check for type 19h then use the DBLG to find the size of the db?

What does the 64h in byte 6 stand for? I can't find anything about that in the help. Shouldn't it be 2 for byte?

Yes, and 64hex = 100 decimal, this is the number of the DB.
 
Ahh... It has to be to early in the morning... I should have seen that... My mistake.

Thanks again

Cheers
Borte
 

Similar Topics

Hello, I have a requirement to manage the text alignment dynamically. So, for example: 1. English Texts should be displayed from Left in...
Replies
0
Views
90
Rockwell Tech Support seemed to have hit a wall with this question. Already updated the version to 5.00.13 per their suggestio but am still...
Replies
2
Views
217
Maybe this is just not possible, or maybe I am doing something wrong. Background; I have a data array of over 1500 products. For sorting I...
Replies
6
Views
757
HEllo, still satruggling with the curse WinCC Unified. See attached picture. I just want to change the fill colour from turqoise to grey and then...
Replies
5
Views
469
I need assistance with writing a logic for sending data from a Station PLC using 1 MSG instruction to an AGC PLC in every cycle using a CIP Data...
Replies
2
Views
580
Back
Top Bottom