'Open Serial Communication', line 2: Cannot locate instruction definition #511

I am trying to take a program that we wrote many years ago in IOControl that is now in PACcontrol and debug so that it can be sent to a GROOV Epic. Everything works except that I get the following error.

ERROR - Block #33 ‘Open Serial Communication’, line 2: Cannot locate instruction definition #511.

Block #33 includes the “Open outgoing communication” and there are two communication handles. I think the problem is the “initial value” in the communication handles, but I’ve not found a way to configure them to eliminate the error. Any clue why this error would occur and how to eliminate it.

Hi Andrew. Welcome to the Opto forums!

The init commands of PAC and EPIC serial are different.
First up, the EPIC serial modules MUST only go in the first 4 slots.
If that is in order, then the manual will guide you.
Page 294 of the PAC Control Users Guide…

PAC control you call out the port, EPIC you call out the name.

Looks like a compiler error to me, so I don’t think the comm handle value would cause that - can you post a screen shot of the block or script?

Hi Philip and Ben,

Attached is a screenshot of the block that is causing the problem. I should also say that my EPIC is not currently connected to any serial devices yet as I am still waiting for them to arrive. Would this cause the problem? I am simply just testing to see if I can get my ancient IOcontrol program, which has been converted to PACcontrol, to debug and load onto the EPIC. This error is the only thing that is keeping the program from debugging and loading onto the EPIC.

Thanks for your help.

You are not calling Open Outgoing Communication properly.

“Current_Communication_Handle” is not a Communication Handle listed in your strategy tree.

I am using a pointer table. Block 142 the two communication handles are moved to a two item pointer table. In block 146 I point at the first item in the table which is opened. Later on in the program (not shown) the index is increased by one and the second communication handle is pointed at and opened.


Okay, that should be good then.

I wonder why the error says line 2 when there is only one entry in that block?

Maybe try putting in a new block (don’t copy the existing) and enter the same command to see if you get a compile error on the new one you create.

I removed block 33 and replaced it with new block with same command in it. I could not delete block 33 because it is referenced by three continue blocks. This is a bit odd because there are only two continue blocks on the chart. I left block 33 unconnected to any other block. I got the same error when I tried to debug. I deleted the command in block 33 and still got the error. I then deleted the continue blocks in the strategy. I still could not delete block 33 but the strategy debugged and loaded to the EPIC. I then added new continue blocks to replace the ones I deleted and the debugging and loading to the EPIC still works. Problem is solved. Thanks.

1 Like