I'm learning how to program PLC with Codesys. Right now I'm trying to map some variable on outport of a plc in Fluidsim. I've already seen the program function declearing the variabels as
EB0 AT %QB0: BYTE;
Now it's pretty ugly to use EB0 dot the port (like EB0.0). I would like something more programmer friendly like:
EmergencyLight AT %QB0.0: BOOL;
but it elevate an error. ChatGPT says that it can be used in struct, something like:
LightOutputs AT %QB0 : STRUCT
Emergency: BOOL; // Q0.0
Activation: BOOL; // Q0.1
Conveyer: BOOL; // Q0.2
END_STRUCT;
but I can't make it work (also no reference on documenation, at least that I can find).
Any suggestion to how to make it works?