I am trying to perform a PDI_Read to a local AXL F SGI module.
From the manual (pg. 27 107958_en_04), I see a list of the Index values to configure the module. For example, Index 0x0280 = SGI_ChannelUsed (Array of BOOL[2]). I can set up a PDI_Read to this index and it pulls the data fine. The same is true of all of the other indices that are listed as long as they are not 32-bit.
I tried to set up a PDI_Read to Index 0x0287 (SGI_AdjustmentValue). This data is "Array of INT32 size of 2." I set up a PLCNext (61131) variable that is Array[0..9] of DINT. However, when I run the PDI_Read, I get a Status 0x090B : 0x000C (invalid data type). I have tried using just about every data type I can think of but it errors out each time.
Any ideas? Plus, how do you attach screen shots in this forum? I wanted to share graphics but I cannot get it to work.
Re. the images, sorry about that, it’s a missing feature of this new forum that has been flagged with the site admins.
My first thought (without trying it myself) - did you try Array[0..1] of DINT for that variable?
I just tried using an Array[0…1] of DINT and it did not work; I got the same Status code.
For other non 32-bit Indices (e.g., UINT16), I was able to use Arrays that were larger than the return data. (I wanted to rule out the array size as an issue).
Thank you Martin. Array of WORD worked. I hadn’t noticed the WORD datatype in the RD_1 block; I just noticed the SGI module mentioned it would return INT32 data.
PS: Thank you for suggesting the AXL_SGI library. I had looked at that library when I first started working with the module. but it did not appear to have the ability to perform the adjustment procedure completely (but I may be mistaken).
The adjustment procedure requires two steps:
1. Tell the SGI module what Adjustment weight will be used for the calibration (this is the parameter data that I am writing) (e.g., the calibration will be 200kg).
2. Read the current data from the SGI and then adjust this reading until it matches the calibration value entered in step 1 (e.g., the reading is 197kg but is internally compensated to read 200kg).
It appears the FB can write the current reading for the adjustment, but it does not appear to have the ability to write the Adjustment value to the module configuration parameters.
I’m glad to hear it’s working.
[quote]the SGI module mentioned it would return INT32 data.[/quote]
It must be remembered that the SGI module, and all Axioline I/O modules, are not designed specifically for any controller - in theory they can be used with any Axioline master, including PLCs and bus couplers. So the manuals for these devices are deliberately written in a general way.
The way that PLCnext Engineer implements the PDI_READ FB is completely outside the control or consideration of the Axioline I/O module developers, as are the implementation details of similar functions in any other device that acts as an Axioline master.
[quote]the AXL_SGI library ... did not appear to have the ability to perform the adjustment procedure completely[/quote]
I think there has been a recent update to that library, but if it still doesn't do what you want then you could ask the developers to add this feature. You can contact them through the product page on the PLCnext Store.