Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SYPT PRO User Guide / SYPT PRO User Guide.doc
Скачиваний:
244
Добавлен:
03.03.2016
Размер:
17.32 Mб
Скачать

Ctud - Up/ Down Counter

This function is a combination of the CTU and CTD counters.

On rising edges of the Up% input, or the Down% input, the counter CV% (current value) output is either incremented to decremented. On up-counting, if CV% reaches the MV% (maximum value), the output Q% will be set to 1 and the counter stops up-counting. On down-counting, if CV% reaches zero, Q% will be set to 1and the counter stops down-counting. Note: The Q% output will remain set until Reset% is set to 1; when Reset% is set to 1, CV% will be set to the value of IV% and Q% will be cleared to 0.

Arguments

Up%

A value to be counted. A transition of Up% from zero to a non-zero value causes CV% to be incremented.

Down%

A value to be counted. A transition of Down% from zero to a non-zero value causes CV% to be decremented.

IV%

This is the initial value to be set in the CV% output when Reset% has a non-zero value.

MV%

This is the maximum value to which the CV% output is to be incremented when Reset% has a non-zero value.

Reset%

If this is set to 1, Q% is set to 0 and CV% is set to the value of IV%.

Return Values

Q%

This value is set to 1 when CV% has the value 0 or MV%. Q% is cleared to 0 at all other times.

CV%

This is the count of rising edges on Input%. CV% will be incremented or decremented when rising edges are seen for Up% or Down% as long as Reset% is 0.

Example

Target/ Language Restrictions

None.

See Also

  • CTU

  • CTD

________________________________________________________________________________

Ctnetdiagnostics

This function returns diagnostic information about CTNet.

Return Values

Msgs%

The total number of messages (cyclic + non-cyclic, transmit and receive) handled by this node so far.

Ovrns%

The number of cyclic data overruns.

LMsgs%

The number of lost receive messages.

Retry%

The number of transmit retries.

Recon%

The number of recons.

ExeNk%

The number of excessive NAKs.

DSync%

The number of duplicate syncs.

MyRec%

The number of locally generated recons.

NCMsg%

The number of non-cyclic messages.

LRMsg%

The number of lost routing messages.

Target/ Language Restrictions

This block is only available on SM-Applications and UD75.

Note that the UD75 platform also provided variables for some of the diagnostic information which were directly readable in a user program. The variables names were:

NOFMESSAGES

NOFOVERRUNS

NOFLOSTMESSAGES

NOFRETRIES

NOFRECONS

NOFEXENAKS

NOFDUPSYNCS

NOFMYRECONS

NOFNONCYCLICMESSAGES

See Also

  • Predefined Variables

________________________________________________________________________________

CtSyncDisableOutputChannel

This function causes a specified CTSync channel to stop writing its data to the Unidrive SP.

Arguments

Chan% - 1 to 3

The Id of the CTSync output channel.

Return Values

Status%

Value

Meaning

1

The operation succeeded.

-1

The operation failed.

-3

Another task is modifying the channel configuration.

Target/ Language Restrictions

This operation is only available on SM-Applications.

See Also

  • CTSyncEnableOutputChannel

  • CTSyncGetSlaveReferences

  • CTSyncSetMasterReferences

  • CTSyncSetupOutputChannel

  • CTSyncWriteOutputChannel

The CTSync information given in this help file should only be used as a quick reference guide. For further information please refer to the SM-Applications User Guide which is available via the DPL Editor's Help menu.

________________________________________________________________________________