Can I define/change Block ID manually


Hello all,

I am having many machines (similar but not the same) running a piece of program, which keeping evolving in the last 10 years.

Sometimes, the site engineers would like to have the newly developed functions on the old machines. So I clone the necessary bits and merge to the old program.

I am using the Block ID number for tracking the change point. Unfortunately, the Block ID is self-generated by the editing software. I would like to know if there is a way I can define/change Block ID, so I can maintain all versions program with the same Block ID.

If not, anyone can share an idea how to maintain the program in a tidy manner? Thank you very much!

P.S. My background is PLC programmer, Opto22 is new for me.

Ming Yue


Hello Ming,

Welcome to the OptoForums! You are correct, each Block ID is self-generated. You cannot define/change those Block IDs. However, both charts and subroutines are modular and easy to re-use as you describe. For example, if you were to export a chart from one strategy and import it into another, your Block IDs would be the same on each copy of that chart.

I’d strongly recommend you use lots of comments to help keep track of your changes. You might find this [U][B]Best Practices document[/B][/U] helpful especially the section on Documenting your projects, with good use of comments, etc.

Are you using any subroutines yet? They’re designed to help you re-use code. If/when you decide to use them, you might find [U][B]this post[/B][/U] helpful too.



Hello Mary,

Thank you very much for the suggestions!

I am new for the role and the program was done by the previous engineers. The blocks were commented by their function, many with the duplicated comments…

As you suggested, I am thinking to setup a naming system and tidy up the comments. Two questions in my head:

  1. Can I edit the block comments in a batch, open/close individual block is painful…

  2. Apart from tracking the comment usage manually (maybe with an excel sheet), does the editor provide a function can list all the block comments?

Thank you very much!



You can find any/all commands in PAC Control config using Edit > Find:

I like these on-the chart comments since they’re easy to see and edit:

Are you using any OptoScript blocks? That editor has a find/replace option…


Hello Mary,

Thank you for replying.

I misunderstood the term “block comment”, “block name” and “on-the-chart comment” in the last reply.

The program I am working on has no block comment, it has duplicate block names all over the program and very little on-the-chart comments. It uses OptoScript, but not in a consistent way.

The block comment is not easy to read, I need to open/close each block. I see it only helpful to put notes between lines inside a block.

The block name is the one I am trying to put ID tags, I can see the “center on block” button can list out all block names in one chart. Not globally, not exportable to sheet format. Difficult to maintain.

I am going to put more on-the-chart comments. But it is a floating object on the screen, not really attach to a block and not possible to be listed also. Difficult to maintain.

I will more focus on set up a good block name naming system, more like PLC programming, each block has its unique/changeable address. Sorry to say, but I can see it is not convenient and I am worrying the naming system can not be maintained properly between engineers, it will be very manual with lots of trivial and repetitive typing… 

P.S. My PAC is at the memory limit, so we can only use PAC Control R8.2g for editing, the previous engineer says the latest version will generate a larger compiled file. But I think it is no far from the latest version in term of UI anyway.

Kind regards,



Hello Ming,

I’m not entirely clear on the concern your trying to address here (don’t forget, [U][B]support is FREE[/B][/U] and they’d be happy to help).

But you might want to check out some of the options in [B]PAC Control under File > View/Print[/B].
In this screen shot, I selected “[B]All Chart Instructions[/B]” and you can see the file there generated by that action:

I hope that helps!