Have an issue that I hadnt noticed before with the CALL function and Heap items (Read: NOT Data-blocks)
Create a UDT (OPT_BatteryMon) and create two different Heap Items referencing the UDT. (eg. OPT_SolarBattery, BatteryMon_TMPST)
In the CALL function set the Optional inputs: Input Value (OPT_SolarBattery), Into Subroutine (BatteryMon_TMPST)
Shows the Red, config/function error circle and gives the following:
Found 1 error editing CALL.
...
Parameter Description
===== ========= ====================
[ 4] CALL Input Parameter #1 passing 1 OPT_BatteryMon structs from Input-Value OPT_SolarBattery Into BatteryMon_TMPST invalid because: When Source is a Heap element, Range must be 1 Source Element
Error above uses the heap items we have in out program:
OPT_BatteryMon is the UDT used for both Heap Items
OPT_SolarBattery is the item that refers to a specific item to monitor (in this case it is a solar site the PLC is connected on/in/to, and is an optional feature within our program)
BatteryMon_TMPST is a temporary item that we copy to/from to process within a shared subroutine call to process all of the battery monitoring (Charge/Discharge Rates, Ah, Runtimes, etc.)
If we change the OPT_SolarBattery heap item to a data-block and reference as "0" the call will work correctly.
If we use the explicit MEMCOPY function before and after the CALL (with no input/output) it works correctly.
Thanks for all the work you guys do