30.5.6.7 Synchronize Output - High Speed Counter (Single-phase Settings, LT Series)

Synchronize output is output that turns ON when the current counter value exceeds the ON preset value and turns OFF when the counter value exceeds the OFF preset value. Since the synchronize output changes the output state only at the point when the current counter value exceeds the ON preset value or when the counter value exceeds the OFF preset value, the synchronize output saves the state even when you change the counter value using operations such as clear preload and counter value. If you turn OFF the synchronize output enable/disable flag while synchronizing output, the synchronize output turns OFF. However, the output does not turn ON if you turn ON the synchronize output enable/disable flag while in that state (even when the state satisfies the conditions for turning on synchronize output).

Summary

In GP-Pro EX, you can set up the initial value for each parameter. After the system is running, you can change parameters with system variables.

The procedure for setting the synchronize output is summarized below.

Setting Up Initial Values

Refer to the setup procedures for GP-Pro EX

Changing After System is Running

  1. Set the ON preset value and the OFF preset value.

  2. Set the parameter under [Request Special I/O Parameter change].

  3. Under [Special I/O Parameter Change Completed], acknowledge that the parameter has been changed.

  4. Enable the synchronize output under [Control Special I/O].

  5. See "Special I/O state" for acknowledgment.

Preset value settings

To set the ON preset value and the OFF preset value, change the parameter under "Request special I/O parameter change" in the system variable (#L_ExIOSpParmChg).

Then, acknowledge the completion under [Special I/O parameter change completed]. Depending on the CH where you allocate the high-speed counter, the request flag and completion flag will have different bit positions.

  1. Specify the ON preset value and the OFF preset value using GP-Pro EX or the system variable.

    For GP-Pro EX

    In [System Settings], select [I/O Driver] and select the "Match" check box on the [Internal Driver 1] screen and click [High Speed Counter Settings].

    In the [High Speed Counter Settings] dialog box, begin set up from [Synchronize Output].

    For the system variable

    Select the value from the ON preset (#L_HSC*_ONP) and the OFF preset (#L_HSC*_OFP).

  2. To specify the value from the system variable, change the parameter under [Request Special I/O Parameter Change].
    #L_ExIOSpParmChg

    Request Special I/O Parameter Change

    This variable uses the CH specified in the I/O driver settings as the 4-bit configuration information to request the special I/O parameter change.

    a: CH1 special I/O parameter change request
    c: CH2 special I/O parameter change request
    e: CH3 special I/O parameter change request
    g: CH4 special I/O parameter change request

    You can also read the previous settings using the Operation bits below.

    b: CH1 special I/O parameter read request
    d: CH2 special I/O parameter read request
    f: CH3 special I/O parameter read request
    h: CH4 special I/O parameter read request

  3. Acknowledge the completion in [Special I/O Parameter Change Completed]. Regarding the details of the variable, the watch bit will differ, depending on the CH to which you allocate the high-speed counter, as shown below.

    Special I/O parameter change completed

    a: CH1 special I/O parameter change complete
    c: CH2 special I/O parameter change complete
    e: CH3 special I/O parameter change complete
    g: CH4 special I/O parameter change complete

    You can also read the previous settings using the watch bits below.

    b: CH1 special I/O parameter read complete
    d: CH2 special I/O parameter read complete
    f: CH3 special I/O parameter read complete
    h: CH4 special I/O parameter read complete

  4. The figure below shows the flag timing chart for the special I/O parameter change request and completion.

    1) Set the ON preset value and the OFF preset value.
    2) Turn on request flag for the special I/O parameter change to change the parameter to the set value.
    3) Once the parameter is changed, the completion flag turns ON.
    4) Acknowledge that the completion flag is ON and turn the request flag OFF.
    5) When the request flag is recognized as OFF, the completion flag turns OFF.

Preset value error status

It shows any error status in the ON preset value and the OFF preset value during the synchronize output. If the system variable (#L_IOStatus[1]) shows the error code 100, you can acknowledge the error status from the system variable (#L_ExIOSpParmErr) value. The watch bit will differ, depending on the CH to which you allocate the high-speed counter.

#L_ExIOSpParmErr

a: CH1 counter preset value error

[1]: Preset value error

[0]: Normal

b: CH2 counter preset value error

[1]: Preset value error

[0]: Normal

c: CH3 counter preset value error

[1]: Preset value error

[0]: Normal

d: CH4 counter preset value error

[1]: Preset value error

[0]: Normal

e: Counter input control error

[1}: Preset value control error (bottom 16 bits in preset value is FFFFh or 0000h)

[0]: Normal

Synchronize output control

Use this function to enable or disable the synchronize output. Turn on the synchronize output flag under the CH special I/O control in the system variable (#L_ExIOSpCtrl) to enable and turn the flag off to disable the output. The Operation bit will differ depending on the CH to which you allocate the high-speed counter.

#L_ExIOSpCtrl

Turn on the 1st bit of the CH to enable and turn it off to disable the output.

Synchronize output status

This function shows whether the synchronize output is enabled or disabled. You can acknowledge the enable/disable status of the synchronize output with the synchronize output flag under the CH special I/O state in the system variable (#L_ExIOSpCtrl). If the flag is ON, the output is enabled. If it is OFF, the output is disabled. The watch bit will differ, depending on the CH to which you allocate the high-speed counter.

#L_ExIOSpCtrl

If the 1st bit of the CH is 1, the synchronize output is enabled. If it is 0, the output is disabled.

Output clear feature during the synchronize output

Use this function to turn OFF the output during the synchronize output. You can also acknowledge the synchronize output being cleared.

You can use the synchronize output clear feature whether the counter is ON of OFF. Turn On the synchronize output clear flag under the CH counter input control request in the system variable (#L_ExIOCntInCtrl) to turn OFF the synchronize output. The Operation bit will differ depending on the CH to which you allocate the high-speed counter.

#L_ExIOCntInCtrl

Counter input control request

Turn ON the 1st bit of the CH to turn OFF the output.

The following figure shows the flag timing chart for the synchronize output and the synchronize output clear.

Counter input control response

If the 1st bit of the CH is 1, the synchronize output has been cleared.

Synchronize output terminal status

You can acknowledge the synchronize output status in the output terminal with the system variable (#L_ExIOSpOut). The watch bit will differ, depending on the CH to which you allocate the high-speed counter.

#L_ExIOSpOut

a: CH1 output state

[1]: Output, [0]: Not output

b: CH2 output state

[1]: Output, [0]: Not output

c: CH3 output state

[1]: Output, [0]: Not output

d: CH4 output state

[1]: Output, [0]: Not output