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

Getchar - Read rs485 Port

This function returns a single character received over the RS485 port.

This block should only be used when the RS485 mode of the option has been set to a User mode (modes 6 to 9 on UD7X, modes 6 to 8 for SM-Applications).

Return Values

Q%

The value of the next character (ASCII code) from the RS485 receive buffer or -1 if no characters remain in the buffer.

Example

Target/ Language Restrictions

Only available on targets with an RS485 port - SM-Applications and UD7X.

See Also

  • PUTCHAR

  • GETKEY

  • PUTKEY

  • PUTBLOCK

________________________________________________________________________________

GETKEY

This function returns a single character received over the RS232 port (Ud7- or MD29) or RS485 port (SM-Applications).

This block should only be used when the RS232 monitor protocol has been disabled (for UD70 or MD29) or the RS485 mode of the option has been set to a User mode (modes 6 to 8) for SM-Applications.

Return Values

Q%

The value of the next character (ASCII code) from the receive buffer or -1 if no characters remain in the buffer.

Example

Target/ Language Restrictions

Only available on targets with an RS485 port - SM-Applications or RS232 port - UD7X and MD29. On UD7X and MD29 the RS232 port has the fixed characteristics (19200 baud, 8 data bits, no parity, 1 start bit, 1 stop bit). For SM-Applications, the RS485 port has charactristics dependent on the RS485 mode that is selected.

See Also

  • GETCHAR

  • PUTCHAR

  • PUTKEY

  • PUTBLOCK

________________________________________________________________________________

GetNextSmartCardFile

This function returns the details of the next file on a smartcard on Unidrive SP. The function will close any open smartcard file.

Return Values

FNum%

The number of the next file on the smartcard. For more information see the Unidrive SP Advanced User Guide.

FType%

The type of the next file on the smartcard.

Status%

The status of the operation.

Value

Meaning

0

OK

1

Card Not Present

3

Communications Failure

Example

See SmartCard Example Program for example program.

Target/ Language Restrictions

Only available on SM-Applications and SM-Applications Lite.

See Also

  • OpenReadSmartCard

  • OpenWriteSmartCard

  • CloseSmartCard

  • ReadSmartCardByte

  • WriteSmartCardByte

  • ReadReadOnlyBit

  • WriteReadOnlyBit

________________________________________________________________________________

GetParAttr

This function returns information and attributes for a given drive or option parameter.

Arguments

Menu%

The number of the menu containing the parameter, e.g. for #05.11 the menu number is 5.

Par%

The parameter number, e.g. for #05.11 the parameter number is 11.

Return Values

Max%

The maximum value for the parameter in scaled form, e.g. if the maximum is 10.25 and the parameter has 2 decimal places of accuracy, the value 1025 will be returned.

Min%

The minimum value for the parameter in scaled form.

Attr%

The parameter attributes. The attributes are a set of bits. The value of a specific attribute can be determined by ANDing (&) with the following constants.

Example

Target/ Language Restrictions

None.

________________________________________________________________________________