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

Ansiwriten - ansi Master Command

This function sends a CT-ANSI parameter write request to a target using the RS485 serial port.

The function transmits a request over the RS485 and does not wait for a response from the target node. The progam must call ANSIREPLY to determine if the write request was successfully actioned by the remote target.

This function is similar in operation to the ANSIWRITE function. The only difference is that the parameter number to be written is specified as an integer value rather than a string.

Arguments

DriveAddress%

The node address of the target to which a parameter value is to be written. This should be an integer in the range 1 to 99.

Parameter%

The identity of the parameter to be read. For example 120 gives the identity of parameter #1.20. The parameter identity is encoded as (100 * Menu Number) + Parameter Number.

Value%

The integer value to be written.

Attribute%

Additional attributes relating to Value%.

0 = Value% contains no decimal places. A Value% of 1234 will write 1234 to the parameter.

1 = Value% is scaled for 1 decimal place. A Value% of 1234 will write 123.4 to the parameter.

2 = Value% is scaled for 2 decimal places. A Value% of 1234 will write 12.34 to the parameter.

3 = Value% is scaled for 3 decimal places. A Value% of 1234 will write 1.234 to the parameter.

128 = Hex write to the CT I/O box (six characters prefixed by X). Only the bottom 24 bits of Value% will be transmitted.

129 = Hex write to the CD drive (4 characters prefixed by >). Only the bottom 16 bits of Value% will be transmitted.

123 = Hex write to the CD drive (6 characters prefixed by >). Only the bottom 24 bits of Value% will be transmitted.

Return Values

The function returns 1 if the write request was sent successfully, or 0 if the message could not be sent (e.g. a previous ANSI transmission is already in progress). If the request has been sent successfully, the ANSIREPLY service must be called to get the status returned from the remote target.

Example

Apart from the difference in the input arguments, the operation of this function is identical to the ANSIWRITE function. Consult the ANSIWRITE section for an example.

Target/ Language Restrictions

None.

See Also

  • ANSIREPLY - UD70 and MD29

  • ANSIREPLY - SM-Applications

  • ANSIWRITE

________________________________________________________________________________

ApcSetRunMode

This function sets the mode for the Advanced Position Controller.

Arguments

Mode%

The required APC mode.

Value

Meaning

0

The APC is disabled.

1

The APC is enabled but only the Reference and Feedback Coutners are updated.

2

The APC is fully enabled and will perform position control, CAM and digital lock operations.

Return Values

Status%

Value

Meaning

0

The operation failed.

1

The operation succeeded.

Target/ Language Restrictions

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

See Also (Control and Access Functions)

  • APCReset

  • APCGetOutputSpeed

  • APCGetOutputSpeedRpmx10

  • APCSelectAbsoluteMode

  • APCSelectRelativeMode

  • APCReadPar

  • APCSetPositionResetOffset

  • APCResetSourcesOnDisable

  • APCDoNotResetSourcesOnDisable

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

________________________________________________________________________________