P4: PLC for SINUMERIK 828D
14.6 Function interface
Basic Functions
1154
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Example, read variable
As 4th variable to be read, a location type should be read:
DB120
3
.DBB1000: 7
DB120
3
.DBB1001: -
DB120
3
.DBW1002: Location number
DB120
3
.DBW1004: Magazine number
DB120
3
.DBW1006: -
DB120
3
.DBD1008: -
If data are to be written to the NCK area, then their values must be entered into the double word with the offset
1008.
Write variables
Values are specified in the double words with offset 1008:
DB120x.DBD1008: Value
Job management: Start job
The user should write the following data into the global job interface (from offset 0):
Number of variables
DB1200.DBB1 = 1 . . . 8: Number of variables to be processed in the job.
Write variables
DB1200.DBX0.1 = 0: Read variables from the NCK area
DB1200.DBX0.1 = 1: Write variables into the NCK area
Start
DB1200.DBX0.1 = 1: Job is started for the specified number of variables.
A new job can only be started if the previous job was completed, see Chapter Job management: Waiting for end
of job [Page 1155].
The execution of a job may take several PLC cycles and vary depending on the utilization; thus, this function
cannot be specified from time perspective.
DB1200 FB2/3
Reading/writing NC data [r/w]
PLC -> NCK interface
Byte
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
DBB 0
Write
variables
Start
DBB 1
Number of variables