GET_4X function in Concept DFB ST returns generic data type cannot be resolved error

D

Thread Starter

David Patrick

DFB ST code is as follows:
>>>>>Structured Text Start <<<<<
VAR
GET_4X_1 : GET_4X;
END_VAR

GET_4X_1 (OFF := Start_4X);
RegOut := GET_4X_1.VAL;
>>>>> Structured Text End <<<<<

Start_4X is UINT
RegOut is WORD

Apparently it gets sick because it can't resolve the output of type ANY for the GET_4X call. All docs including Insert FFB menu option lead you to believe you should be able to get away with this.

Tried calling it as function as opposed to function block without declaring it as in:

RegOut := GET_4X (OFF := Start_4X);

Function isn't recognized in this case.

Can you not use FBs with outputs of type ANY in ST?

Anyone?
 
H

Hunter Farris

Use the following format.

VAR
TEMP : GET_4X;
END_VAR

TEMP(OFF:=TEMPA, VAL=>TEMPB);

Where TEMPA is UINT and TEMPA is ANY datatype.

I use this a lot and it works. The format is an issue with Concept and a known bug.

Hunter Farris

 
Top