Kang
Hi sir
 
Is it possible to set the input or output variable type of function block to any type? Which means the IN/OUT variable type will be flexible and change to the same type as the variable connected to the IN/OUT pin of FB.
 
The application is that we want to have a customized FB in editor to deal with various variable type, maybe LREAL, LINT or ULINT according to different situation. It would be kind of stupid if we clarify the input and output pin for each variable type.
Reply 0 0
thiagoralves
Unfortunately this is not possible. The compiler is very strict with the data type. What you could do is use conversion blocks before your block
Reply 0 0
Reply