Difference between revisions of "S7-SoftPLC:cifX Basic configuration"
From IBHsoftec Wiki English
(Created page with "The basic configuration features of the cifX-cards are set here. If no PROFIBUS<sup>®</sup> is used, the configuration has to be executed with the System Configurator SyCon....") |
|||
| Line 101: | Line 101: | ||
| CHANNEL || := 0 || //INPUT BYTE | | CHANNEL || := 0 || //INPUT BYTE | ||
|- | |- | ||
| − | | TIMEOUT || := 5 || // | + | | TIMEOUT || := 5 || //OUTPUT DWORD |
|- | |- | ||
| INDATA || := P#DB10.DBX0.0 BYTE 20 || //INPUT ANY | | INDATA || := P#DB10.DBX0.0 BYTE 20 || //INPUT ANY | ||
Revision as of 11:05, 17 January 2013
The basic configuration features of the cifX-cards are set here.
If no PROFIBUS® is used, the configuration has to be executed with the System Configurator SyCon.NET of Hilscher company.
How the driver is integrated into S7-SoftPLC is part of these instructions:
Using the SFC
Command SFC
Via the SFC 1008 it is possible to read multiple informations from the cifX-cards
| CALL | SFC/FC 1008 | |
| COMMAND | := 0 | //INPUT DWORD |
| BOARD | := 0 | //INPUT BYTE |
| CHANNEL | := 0 | //INPUT BYTE |
| DATA | := P#DB10.DBX0.0 BYTE 100 | //INPUT ANY |
| RET_VAL | := MW 0 | //RESULT INT |
| Command | Length ANY-Pointer Dataarea | Description |
|---|---|---|
| 1 | 24 | Reads the SystemInformation from cifX-card |
| 2 | 48 | Reads the SystemInfoBlock from cifX-card |
| 3 | Reads the SystemChannelBlock from cifX-card | |
| 4 | 8 | Reads the SystemControlBlock from cifX-card |
| 5 | 64 | Reads the SystemStatusBlock from cifX-card |
| 6 | 165 | Reads the ChannelInformation from cifX-card |
| 7 | 64 | Reads the CommonStatusBlock from cifX-card |
Busdiagnose SFC
Via the SFC 1009 the CommonStatusBlock is read
| CALL | SFC/FC 1009 | |
| BOARD | := 0 | //INPUT BYTE |
| CHANNEL | := 0 | //INPUT BYTE |
| RET_VAL | := MW 0 | //RESULT INT |
| COMCOS | := MD 2 | //OUTPUT DWORD |
| COMSTATE | := MD 6 | //OUTPUT DWORD |
| COMERROR | := MD 10 | //OUTPUT DWORD |
| SLAVESTATE | := MD 14 | //OUTPUT DWORD |
| SLAVEERROR | := MD 18 | //OUTPUT DWORD |
| SLAVECONF | := MD 22 | //OUTPUT DWORD |
| SLAVEACTIVE | := MD 26 | //OUTPUT DWORD |
| SLAVEFAULT | := MD 30 | //OUTPUT DWORD |
Message SFC
Via SFC 1010 Messages are sent to cifX-card
| CALL | SFC/FC 1010 | |
| SEND | := 0 | //INPUT BOOL |
| BOARD | := 0 | //INPUT BYTE |
| CHANNEL | := 0 | //INPUT BYTE |
| TIMEOUT | := 5 | //OUTPUT DWORD |
| INDATA | := P#DB10.DBX0.0 BYTE 20 | //INPUT ANY |
| OUTDATA | := P#DB0.DBX20.0 BYTE 20 | //INPUT ANY |
| RET_VAL | := MW 0 | //RESULT INT |
| BUSY | := M2.0 | //OUTPUT BOOL |
| NDR | := M2.1 | //OUTPUT BOOL |
| ERROR | := M2.2 | //OUTPUT BOOL |
SFC 14
Via the SFC "DPRD_DAT" inputs can be read out of the cifX dualport RAM
| CALL | SFC/FC 14 | |
| LADDR | := W#16#100 | //INPUT WORD |
| RET_VAL | := MW 0 | //RESULT INT |
| RECORD | := P#M 100.0 BYTE 1 | //OUTPUT ANY |
| Parameter | Type of data | Description |
|---|---|---|
| LADDR | WORD | Start address of inputs to be read |
| RET_VAL | INT | 0 on success |
| RECORD | ANY | ANY-Pointer to readout data |
SFC 15
Via the SFC "DPWR_DAT" outputs can be written into the cifX dualport RAM
| CALL | SFC/FC 15 | |
| LADDR | := W#16#100 | //INPUT WORD |
| RECORD | := P#M 102.0 BYTE 1 | //INPUT ANY |
| RET_VAL | := MW 0 | //RESULT INT |
| Parameter | Type of data | Description |
|---|---|---|
| LADDR | WORD | Start address of outputs to be written |
| RECORD | ANY | ANY-Pointer on data to be written |
| RET_VAL | INT | 0 on success |