Is there a way to change the default values of a data type defined in the BasicLib?
I am creating control module types with the input and output parameters of the BoolConnection type. I would like to change the default values of the Forward.Status input and output parameters within the control module type (default 16#C) to differentiate between a connected parameter which would have a default status of 16#C versus a non-connected parameter which would have another predefined status.
You will need to make a copy of the data type where you would like different default component values, rename it to whatever, and exchange the data type of the desired parameter in the control module you are using with your own. If you're using a control module from a standard library, you will need to make a copy of this as well. Enter whatever default values you would like in the Default Value row of your new data type, and you're good to go.
If you are connecting only components of your parameter rather than the entire data type, be aware that you will not be asked to connect components which have default values configured in the data type.
If <BoolConnection>.Forward.Connected then
<BoolConnection>.Forward.Status := 16#C0 (* Good Status or the status you want to assign*)
<BoolConnection>.Forward.Status := 16#1 (* Connection down *)
if you want to change this status value during first execution during application startup, then write it inside the code tab with prefix 'Start_'.