[ Pobierz całość w formacie PDF ]

Slotnum is generated if the scanner determines the slot does not contain a valid discrete input
module.
Should contain the bits in the discrete input module to include in the comparison.
Only bits 0 - 7 of word 0 of the module can be configured for DII s. IOIncludeMask
IOIncludeMask
is a bit-mapped mask. Any bit set to 1 in this mask includes the corresponding bit of
the discrete input module in the comparison. Any bit set to 0 is ignored.
Defines the bit pattern to compare. Only bits that correspond to bits set to 1 in
IOIncludeMask are used. Only bits 0 - 7 are valid. IOEdgeType is a bit-mapped
IOEdgeType value. If a bit is set to 1, the comparison for the bit matches when its corresponding
discrete input bit changes from 0 to 1. If a bit is set to 0, the comparison for the bit
matches when its corresponding discrete input bit changes from 1 to 0.
When PresetCount is 0 or 1, the scanner generates a message each time the
PresetCount comparison matches. When it is between 2 and 65535, the message is generated
when the number of comparison matches meets PresetCount.
The scanner recognizes a match when every bit in the IOIncludeMask has finished transitioning. After a
message is generated, another message will be generated as soon as the next specified number of
matches occurs.
To disable DII s, set IOIncludeMask to 0 with a valid SlotNum. DII s are disabled by default on reset.
Publication 1747-6.5.3 June 1998
6 6 Library of Routines OC_ConfigureDII
Return Value:
Name: Value: Description:
SUCCESS discrete input interrupt (DII) was configured successfully
2
ERR_OCACCESS handle does not have access to the scanner
10
ERR_OCRESPONSE scanner did not respond to request
14
ERR_OCSCANCFG scanner has not been configured
12
ERR_OCSLOT slot number is invalid
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE Handle;
DII_CFG diicfg;
int retcode;
diicfg.Slotnum = 6;/* Slot 6 has discrete input module */
diicfg.IOIncludeMask = 1;/* bit 0 is the input trigger */
diicfg.IOEdgeType = 1;/* bit 0 must toggle from low to high */
diicfg.PresetCount = 3;/* bit 0 must toggle 3 times */
retcode = OC_ConfigureDII( Handle, &diicfg );
/* Use OC_PollScanner() to check for DII messages */
Publication 1747-6.5.3 June 1998
OC_CreateIO Configuration Library of Routines 6 7
OC_CreateIO OC_CreateIOConfiguration creates a scanner configuration from an application-
Configuration
specific installation of rack sizes and installed modules. See chapter 5 for more
information.
Syntax:
int OC_CreateIOConfiguration(OCIOCFG *iocfg);
Parameters:
Parameter: Description:
iocfg Specifies the rack sizes and installed modules
Description:
Modules can be specified by name or by mix and type. The function automatically fills in the rest of the
required information in the OCIOCFG structure.
This function returns in iocfg the scanner configuration information obtained from the rack sizes and
installed module types specified in iocfg. The scanner configuration can then be downloaded to the scanner
with OC_DownloadIOConfiguration, which allows the application to control the number of racks and their
sizes and the position and type of modules installed in the racks.
The OCIOCFG structure is defined as:
typedef struct tagOCIOCFG
{
BYTE Rack1Size; /* number of slots in Rack 1 */
BYTE Rack2Size; /* number of slots in Rack 2 */
BYTE Rack3Size; /* number of slots in Rack 3 */
OCSLOTCFG SlotCfg[OCMAXSLOT];/* configuration for each slot */
} OCIOCFG;
Return Value:
Name: Value: Description:
SUCCESS I/O configuration was read successfully
18
at least one module was not found in the internal database
ERR_OCUNKNOWN The SlotCfg data for the unknown module is not altered; the remaining
modules are configured.
Considerations:
Supported in the DOS API library and the Windows NT API library
Publication 1747-6.5.3 June 1998
6 8 Library of Routines OC_CreateIO Configuration
Example:
OCIOCFG iocfg;
int retcode, numslots, i;
char module_name[] =  1746-BAS ;
iocfg.Rack1Size = 10; /* 10 slot chassis */
iocfg.Rack2Size = 7; /* 7 slot chassis */
iocfg.Rack3Size = 0; /* Only 2 chassis */
numslots = iocfg.Rack1Size + iocfg.Rack2Size + iocfg.Rack3Size;
for ( i=1; i
iocfg.SlotCfg[i].mix = OCEMPTYMIX;
iocfg.SlotCfg[i].type = OCEMPTYTYPE; /* Empty all slots */
}
iocfg.SlotCfg[6].mix = 35;
iocfg.SlotCfg[6].type = 6; /* Slot 6 has 1746-BAS module */
or
iocfg.SlotCfg[6].name = module_name; /* Use name instead */
.
. /* Add additional module information to */
. /* match the physical I/O configuration */
.
retcode = OC_CreateIOConfiguration( &iocfg );
/* Use OC_DownloadIOConfiguration() to download the information */
Publication 1747-6.5.3 June 1998
OC_DemandInputScan Library of Routines 6 9
OC_DemandInputScan OC_DemandInputScan forces the scanner to immediately perform an input scan.
Syntax:
int OC_DemandInputScan(HANDLE handle, int mode);
Parameters:
Parameter: Description:
handle Must be a valid handle returned from OC_OpenScanner
If mode is:
OCWAIT OC_DemandInputScan waits for the input scan to be
mode
completed before returning to the caller.
OCNOWAITOC_DemandInputScan returns immediately.
Description:
If an I/O scan is in progress when this function is called, the input scan is performed after the current scan
has completed.
The scanner updates the input image with data read from the modules. Use OC_ReadInputImage to read
data from the input image.
Return Value:
Name: Value: Description:
SUCCESS demand input request was successful
2
ERR_OCACCESS handle does not have access to scanner
10
ERR_OCRESPONSE scanner did not respond to request
14
ERR_OCSCANCFG scanner has not been configured
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE Handle;
int retcode;
retcode = OC_DemandInputScan( Handle, OCWAIT );
Publication 1747-6.5.3 June 1998
6 10 Library of Routines OC_DemandOutputScan
OC_DemandOutputScan OC_DemandOutputScan forces the scanner to immediately perform an output scan.
Syntax: [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zambezia2013.opx.pl
  • Pokrewne

    Start
    Narcyza śąmichowska Poganka
    Holden Kelley Jane The Girl Behind the Glass [nieof]
    Anne McCaffrey Cykl Statki (2) Statek bliÂźniaczy
    Howlett John Tango November
    Gromyko Olga Najwyśźsza wiedśĹźma 1
    Derekica Snake My Hostage My Love [MM] (pdf)
    ÂŚwiatowa metropolia Napierała Piotr
    Hobb, Robin Farseer 01 Assassins's Apprentice
    cierpienia mlodego wertera
    71. Darcy Lilian Terapia wstrzć…sowa Na dśÂ‚ugie jesienne wieczory
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • ptsite.xlx.pl