I have created a function block to see how it works with the following code.
FUNCTION_BLOCK POU_1
VAR_INPUT
in1: BOOL;
in2: BOOL;
END_VAR
VAR_OUTPUT
out1: BOOL;
END_VAR
VAR
{attribute 'symbol' := 'none'}
{attribute 'hide'}
{attribute 'instance-path'}
{attribute 'noinit'}
FbName : STRING(255);
END_VAR
if I run that FB in a plc the variable FB_name nor see it.
BR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello:
There is some way to extract the name of a function block (from it) to a variable in the same FB.
I do not know if I explained myself very well
Best regards
Try
{Attribute 'parameterstringof'}
Sent from my Moto G (5S) Plus using Tapatalk
hello:
Thanks for request, you can write a example to show me some example of the use of that attribute, I do not find any example or help on how to use it.
Best Regards,
Example:
The attribute is instance-path and noInit not parameterstringof aI am sorry.
Is mandatory add both attributes: noInit and instance-path
Salut!
very thanks,
I have created a function block to see how it works with the following code.
FUNCTION_BLOCK POU_1
VAR_INPUT
in1: BOOL;
in2: BOOL;
END_VAR
VAR_OUTPUT
out1: BOOL;
END_VAR
VAR
{attribute 'symbol' := 'none'}
{attribute 'hide'}
{attribute 'instance-path'}
{attribute 'noinit'}
FbName : STRING(255);
END_VAR
if I run that FB in a plc the variable FB_name nor see it.
BR
You need another attribute, reflection
https://help.codesys.com/webapp/_cds_pr ... n=3.5.13.0
Sent from my Moto G (5S) Plus using Tapatalk
Hi mr.
Do you have the script? Cause the link is down.
Last edit: andrebrandt 2024-09-27
very thanks
Hi mr.
Do you have the script? Cause the link is down.
Hi mr.
Do you have the script? Cause the link is down.
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_pragma_attribute_instance_path.html