Hello Community,
I’m hoping this is the right place.
I’m trying to use PDI_READ with an AXL F DI16/1 DO16/1 2H module on an AXC F 2152 controller. Firmware version is 2023.0.0 LTS (23.0.0.65), hardware version is 04.
PLCnextEngineer version is 2023.0.3
What works:
PDI_READ_1(INDEX := WORD#16#000B, SUBINDEX := BYTE#16#00);
(I’m omitting the other parameters, but I’m of course using them)
RD_1 gives me the expected output, a date and a version number.
What doesn’t work:
PDI_READ_1(INDEX := WORD#16#000B, SUBINDEX := BYTE#16#01);
I expect RD_1 to give me just the date. Instead RD_1 just contains whatever was read previously.
PDI_READ_1.ERROR is TRUE,
PDI_READ_1.STATUS[0] is 16#0607
PDI_READ_1.STATUS[1] is 16#0000
Thank you for any advice you can offer!
Daniel
Index 0x000B does not have any sub-indexes, that’s why a non-zero sub-index value does not work.
Index 0x000B always returns two elements; you can’t return those two elements individually.
An example of an Index with Subindexes is Index 0x0018 (section 13.3 of the user manual). The table shows the list of valid Subindexes for Index 0x0018.
Hello Martin,
thank you for your answer.
You are correct, the user manual for the module does not show any sub-indexes for 0x000B. However, the Axioline F system manual does show them, that’s why I assumed they would work with any module.
As for index 0x0018, I cannot use any sub-index either. SUBINDEX := 0 works but any value for SUBINDEX <> 0 results in ERROR = TRUE, STATUS[0] = 0x0605, STATUS[1] = 0x0011, and no change in RD_1.
Daniel
Could you, or anybody else comment on why sub-indexes for index 0x0018 don’t work for me?
I’ve attached a minimal example, use debug mode to set variable values.
Daniel
PDI_READ.zip
I’ve reproduced this problem on my desk. I can’t see anything in the Axioline documentation that would indicate why the subindexes would not be available on an Axioline I/O module. I’ve asked the relevant support team to look at this and I’ll let you know when there’s an answer.
I have an answer to one of the issues discussed above:
the user manual for the module does not show any sub-indexes for 0x000B. However, the Axioline F system manual does show them I assume this is what you are referring to?
It is not unreasonable to assume that the two dot fields refer to subindexes that can be retrieved individually, but I have been told that this is not the case. Instead, these dot fields simply describe the individual elements of the complete record.
I am waiting for more information about the Subindexes that are listed for Index 0x0018 in the data sheet for the AXL F DI16/1 DO16/1 2H.
It seems that the Data Sheet for the AXL F DI16/1 DO16/1 2H module is wrong, or at least misleading. Subindex access to PDI objects in that I/O module is not possible. I understand that this will be corrected/clarified in future versions of the documentation.
It is still possible to access any PDI record using Subindex 0, and then extracting the required field(s) from the returned data.
Thanks for bringing this to our attention.
Hello Martin and PLCnext Team,
thank you for taking the time to investigate this. It is quite useful for me to know whether or not I have made any mistakes a well.
Daniel