Lenze Global Drive PLC Developer Studio Instrukcja Użytkownika Strona 17

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 27
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 16
LenzeFpiDrv.lib function library
Functions
3.1 Initialisation (L_Rs232Open)
3−2
L
LenzeFpiDrv.lib EN 1.1
Feedback value
Data type Bit Value Meaning Priority
Double Word 0
0 Driver is initialised.
1 Error during initialisation.
1
0 Driver setting Ok.
1 Selected driver ( wDrvNr ) is not available on target system.
2
0 Baud rate setting Ok.
1 Selected baud rate ( dwBaudrate ) is not available.
3
0 Data bits setting Ok.
1 Wrong number of data bits ( byNumberOfDataBits ).
4
0 Stop bits setting Ok.
1 Wrong number of stop bits ( byNumberOfStopBits ).
5
0 Parity setting Ok.
1 Wrong parity setting ( byParity ).
6−15 Reserved for future extensions (bits set to 0).
16−31 Version of the FPI driver
Format: main version/subversion (e. g. 0103hex = version 1.03)
Example
Calling up the function in ST with decading of the feedback value:
(* open FPI − returns g_dwOpenStatus *)
g_dwOpenStatus := L_Rs232Open (30, 4800, 8, 1, 1);
g_bInitOK := NOT DWORD_TO_BOOL (g_dwOpenStatus AND 16#0000_00001);
g_bDriverFail := DWORD_TO_BOOL ( SHR (g_dwOpenStatus,1) AND 16#0000_0001);
g_bBaudrateFail:= DWORD_TO_BOOL ( SHR (g_dwOpenStatus,2) AND 16#0000_0001);
g_bDatabitsFail:= DWORD_TO_BOOL ( SHR (g_dwOpenStatus,3) AND 16#0000_0001);
g_bStopbitsFail:= DWORD_TO_BOOL ( SHR (g_dwOpenStatus,4) AND 16#0000_0001);
g_bParityFail := DWORD_TO_BOOL ( SHR (g_dwOpenStatus,5) AND 16#0000_0001);
g_wVersion := DWORD_TO_WORD ( SHR (g_dwOpenStatus,16) AND 16#FFFF);
Przeglądanie stron 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 26 27

Komentarze do niniejszej Instrukcji

Brak uwag