Search code examples
plcstructured-text

Pulse Timer in Gx Works 2, Structured Text, gives compilation error C9009


I want to do one simple thing: Implement a pulse timer for a PLC project(FX3S-PLC) in GX Works 2.

I have followed the dodumentation as I interpreted it, here is my timer instance:

TP_1_Inst(IN:=TP_1_I, PT:=TP_1_PT, Q:=TP_1_Q, ET:=TP_1_ET);

Here are my declarations done in the global variable list:

Class      | Label Name | Data Type | Constant | Device | Address |
VAR_GLOBAL | TP_1_Inst  | TP        |          |        |         |
VAR_GLOBAL | TP_1_I     | Bit       |          |        |         |
VAR_GLOBAL | TP_1_PT    | Time      |          |        |         |
VAR_GLOBAL | TP_1_Q     | Bit       |          |        |         |
VAR_GLOBAL | TP_1_ET    | Time      |          |        |         |

When I compile I get error C9009. Insufficient number of Timer points in device/label automatic-assign setting.

I have quadruple-checked the documentation and I do not see what I am missing. A side note is that the documentation says what I should do and not detailing how I should do it, so the global variable list is what I have deduced that I should implement. That is also what the error seems to indicate I am missing something in.

There are plenty of examples outside the documentation using ladder which implements timers differently from Structured Text. The specific timer, for one, is defined in the ladder examples rather than defining the instance of a data type in the GVL like I have done.

But I need to do this in structured text and I am not finding sufficient examples for that. On one hand, maybe one thing is that I am not linking it to a specific timer like the ladder examples do? On the other hand, with how the data types are defined the compiler should be able to understand what timer to use already... How do I do this in ST? I cannot find it.

Thanks in advance!


Solution

  • I solved it.

    My GX Works 2 version is 1.586L, and it seems that version does not match the documentation(Even though the documentation is read directly through said program...)

    I tested the exact same setup on a newer version 1.620W and it works now!

    I assume somewhere between the versions the timers interface were changed to match the standard but the doumentation for the old version is not included for whatever reason.