Does anyone know an easy method to map IO with an Array without having to manually enter all of them one by one? I am trying to map IO BYTEs with an array of SINTs but I do not know if its possible to do that without having to enter them one by one.
I dont know about array but if you want to speed it up you can create a global variable list where you write something like this:
Code:
VAR
yourVariableName: BOOL AT %IBX.X;
END_VAR
That way you can bulk create it in a spread sheet program and pastenit into the global variable list. Im pretty sure that is the syntax, feel free to correct me or by checking the codesys help.
Thank you ojz0r and AlfredoQuintero for your responses. I have seen this post before where you can define in the tag itself for the IO it should be mapped to. But unfortunately I could not find a way to map an array of BYTE to an array of IO (BYTES) in one go. The way you have described is to map one array to one object which I can by defining it as:
yourVariableName AT %IBX: yourDUT;
But I need to map an array of object to an array of object (for example a SINT or BYTE), please correct my syntax
yourVariableName AT [%IB408...%IB425] : ARRAY [0...17] OF BYTE;
(In the above example %IB408 to %IB425 are of type BYTE)
The above line gives the following error :
[ERROR] PLC: Panasonic_Robot [Device: PLC Logic: Application](Line 5): C0030: Direct address expected after AT instead of [
Would really appreciate if someone could help me on this