Oc_getstatusfile -36 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 90

6–36
Library of Routines
OC_GetStatusFile
Publication 1747-6.5.3 June 1998
OC_GetStatusFile
OC_GetStatusFile reads a copy of the current scanner system status file into the
STSFILE
structure pointed to by
stsfil
on the scanner.
Syntax:
int
OC_GetStatusFile(HANDLE handle, STSFILE *stsfil);
Parameters:
Description:
The status file is updated by the scanner at the end of each I/O scan.
The
STSFILE
structure is defined as:
typedef struct tagSTSFILE
{
WORD
wWordNum[OCSTSFILEWSIZE];
} STSFILE;
The status file is organized by words. The status file uses these classifications to define the data each word
contains:
The status file contains:
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
stsfil
Points to the
STSFILE
structure that contains scanner system status
This classification:
Means the data:
status
is used primarily to monitor scanner options or status. This
information is usually not written by the application, except to
clear a function such as a minor error bit.
dynamic configuration
can be written by application to select scanner options while
in Scan mode.
Word/Bit:
Classification:
Description:
0/0 to 0/4
status
Scanner mode/status
bit 4
bit 3
bit 2bit 1bit 0
1
0
000= (16) download in progress
1
0
001= (17) Idle mode (program)
1
1
110= (30) Scan mode (run)
All other values for bits 0-4 are reserved.
0/5
status
Forces enabled bit
This bit is set if forces have been enabled.