Suddenly receiving Error -69 Invalid parameter passed...?

I have several pointer tables initialized with pointers to Digital Outputs.

ptLR_Outputs[0] = &LR_Outlet1; // Base of Stairs
ptLR_Outputs[1] = &LR_Outlet2; // Right of Bedroom Door
ptLR_Outputs[2] = &LR_Outlet3; // Murphy Bed
ptLR_Outputs[3] = &LR_Outlet4; // Kitchen Cabinet
ptLR_Outputs[4] = &LR_Outlet5; // Left of Murphy
ptLR_Outputs[5] = &Kitchen_Lgts; // Kitchen Main Lgts
ptLR_Outputs[6] = null;

I process the table:

for J = 0 to 11 Step 1 // Scene 2 Selected - Step through Scene 2 Output List
pOut = ptLR_Outputs[J];
if(not(pOut == null)) then
if(LR_S2_Flag[J]) then // Get Output State?
*pOut = 1; // Turn Output ON
*pOut = 0; // Turn Output OFF
next // Check Next

I receive error 69 at “pOut = ptLR_Outputs[J];” (pOut is a Digital Output Pointer). I have been using this method and assigning ‘null’ to a table element when an output is no longer used and has not caused the error? On this routine it does? The chart continues to run but the message table lists each error. What I’m I missing?

I get that error whenever assigning a null pointer table value to a pointer as well. Seems to be normal, not sure why you were not getting it before. Maybe it didn’t alert in older versions or firmware???

Anyways, I would just change your null check to be above the assignment and check for null on the table value:

if(not ptLR_Outputs[J] == null) then
  pOut = ptLR_Outputs[J];
1 Like

Thanks Philip, that works, no assignment error now? Seems quirky but runs clean.

1 Like