Alas, it turns out references cannot be put into arrays.
Thank you. I will look into references.
I have found that I never actually initiated the pointer. Please delete this thread.
I have made an array of pointers to places in memory I would like to write to while treating them as a continuous block. But I cannot find the syntax for doing this as all examples of dereferencing has the pointer to the value being copied and not the one being overwritten. This triggers a runtime error at the assignment: IF xFirstCycle THEN apwPointers[0] := ADR(LagerD.Evaporator1.iDefrostHour1); xFirstCycle := FALSE; END_IF IF Slave.udiWriteAccessCounter <> udiWriteCounter THEN apwPointers[Slave.wWriteAddress]^...
I have made an array of pointers to places in memory I would like to write to while treating them as a continuous block. But I cannot find the syntax for doing this as all examples of dereferencing has the pointer to the value being copied and not the one being overwritten. This triggers a runtime error: IF Slave.udiWriteAccessCounter <> udiWriteCounter THEN apwPointers[Slave.wWriteAddress]^ := awHoldingRegisters[Slave.wWriteAddress]; udiWriteCounter := Slave.udiWriteAccessCounter; END_IF