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

Stuff2 / stuff4 / stuff8 - Bit Stuffers

The bit stuffers, STUFF2, STUFF4 and STUFF8 stuff 2, 4 or 8 bits respectively into a 32-bit value starting at a given bit position.

Arguments

Bit0% to Bit7%

Bit inputs. Only bit 0 of each input will be stuffed..

Word%

The value into which the bits are to be stuffed.

Pos%

The starting bit position.

Return Values

Q

The stuffed 32-bit output.

Example

Target/ Language Restrictions

None.

See Also

  • SPLITTER

  • DECODER4/DECODER8

  • ENCODER4/ENCODER8

  • DATASTUFF

________________________________________________________________________________

Tan - Tan Function

This function returns the mathematical tangent of an input angle expressed in radians.

Arguments

IN

An angle expressed in radians.

Return Values

Q

The floating-point tangent of IN.

Example

Target/ Language Restrictions

None.

See Also

  • SIN

  • COS

________________________________________________________________________________

Tcyclic - Cyclic Timer

This timer allows a cyclic boolean output to be generated with symmetrical or asymmetrical ON/OFF times.

Arguments

Input%

If non-zero, the output Q will be cycled between 0 and 1. If Input% is zero, Q% is cleared to zero.

Ton%

The cycle on time in milliseconds.

Toff%

The cycle off time in milliseconds.

Return Values

Q%

The cycled output.

ET%

The elapsed time since the last change in state of Q%.

Example

The following diagram shows the timing for TCyclic.

Target/ Language Restrictions

None.

See Also

  • TON

  • TON2

  • TONRET

  • TOFF

  • TOFF2

  • TOFFRET

  • PWM

  • PT

  • PTD

________________________________________________________________________________

TIME

This function returns the number of milliseconds elapsed since power up or last reset.

Return Values

Q%

The time in milliseconds.

Target/ Language Restrictions

None.

________________________________________________________________________________

TOFF

The Off-Timer is used to delay a negative transition.

Arguments

Input%

On a rising edge of Input% (a zero to non-zero transition), the output Q% is set to 1. On a falling edge transition (non-zero to zero), the output Q% is cleared DT% milliseconds later.

DT%

The delay time in milliseconds after which the output Q% should be cleared when a falling edge transition is detected on Input%.

Return Values

Q%

The output.

Example

The following diagram shows the realtionship between the inputs and outputs.

Target/ Language Restrictions

None.

See Also

  • TOFF2

  • TOFFRet

  • TON

  • TON2

  • TONRet

________________________________________________________________________________

TOFF2

The Off-Timer is used to delay a negative transition. The block is similar to the TOFF function block but also outputs the current timer value.

Arguments

Input%

On a rising edge of Input% (a zero to non-zero transition), the output Q% is set to 1. On a falling edge transition (non-zero to zero), the output Q% is cleared DT% milliseconds later.

DT%

The delay time in milliseconds after which the output Q% should be cleared when a falling edge transition is detected on Input%.

Return Values

Q%

The output.

ET%

The elapsed time in milliseconds since a falling edge transition was detected on Input%.

Example

The following diagram shows the realtionship between the inputs and outputs.

Target/ Language Restrictions

None.

See Also

  • TOFF

  • TOFFRet

  • TON

  • TON2

  • TONRet

________________________________________________________________________________