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

RtuMasterStatus

Modbus-RTU master command to read the status of the master.

Return Values

Status%

Returns the status of the commands. Valid return codes are

Example

Refer to either RTUPresetRegs or RTUPresetParas for information on using this command.

Target/ Language Restrictions

For use with SM-Applications only.

See Also

  • RTUReadRegs

  • RTUReadParas

  • RTUReadInputRegs

  • RTUPresetRegs

  • RTUPresetParas

  • RTUMasterReply

________________________________________________________________________________

Runtime

This function block has the same functionality as the analogue Hours run meter found on control panels. It can be used to register the accumulative time that the starter/equipment has been running.

Arguments

EN%

Enables (non-zero) or stops (zero) the elapsed time counter.

Reg%

The ID of a non-volatile parameter to be used to store the running time on power down. The Id is specified in MMPP format, e.g. 7099 indicates parameter #70.99. The parameter should be non-volatile so that the running time can be stored when a power down occurs.

For the Runtime function block to continue incrementing the running time after a power-cycle, parameter #17.20 (UD7X) or #81.20 (SM-Applications/ SM-Applications Lite) must be set to 1 to enable the non-volatile PLC registers to be saved on power down.

Upon powering up the register will have the value that it contained prior to losing power. The block can then continue incrementing the running time.

Reset%

If set to 1, the output values are cleared to 0.

Return Values

Q%

Value

Meaning

0

Timer stopped OR a recognised non-volatile parameter has not been specified at the Reg% input.

1

RUNTIME enabled OK.

Days%

The elapsed number of days.

HHMM%

The elapsed number of hours and minutes.

Sec%

The elapsed number of seconds.

Target/ Language Restrictions

None.

________________________________________________________________________________

SCAN

This function block indicates the scan sample time for the task it is used within. It has been designed to work in any task but its main purpose is to give the user some indication of the user program task times running in a free running task like the BACKGROUND TASK. The task must be cyclic. Indication is given in microseconds.

If the block is placed in a real-time task the Min, Ave and Max outputs will ALL show the exact task timebase in microseconds.

Arguments

STime%

The period in milliseconds over which the outputs are to be calculated.

Return Values

Min%

The minimum scan time (in microseconds) over the period STime%.

Ave%

The average scan time (in microseconds) over the period STime%.

Max%

The maximum scan time (in microseconds) over the period STime%.

Q%

Indicates whether the task completed within the sample time STime%.

Value

Meaning

0

Task did not complete.

1

Task did complete.

Target/ Language Restrictions

None.

See Also

  • GetSamplesPerSec

  • GetTaskID

________________________________________________________________________________

Scheduleevent

Schedules the execution of one of the four EVENT tasks on an SM-Applications or SM-Applications Lite module.

Within an event task you may use parameters #90.12 to #90.15 (EVENT to EVENT3) to determine the cause and reason code for an event trigger.

Arguments

Slot%

The destination option slot number in which to schedule the event task. The slot must have an SM-Applications or SM-Applications Lite module fitted. To schedule a task on the local option, set this argument to 0.

TskID%

Specifies which EVENT task to run. 0 = EVENT, 1 = EVENT1, 2 = EVENT2, 3 = EVENT3.

Reason%

A user defined reason code that can be used by the event task to know what triggered it. Only values between 34 and 63 may used by the user. Values 33 and below and 64 and above are reserved.

Return Values

Q%

The operation status.

Target/ Language Restrictions

This function is only available on SM-Applications and SM-Applications Lite.

________________________________________________________________________________