NCR realpos 70 User Manual page 136

Hide thumbs Also See for realpos 70:
Table of Contents

Advertisement

7-18 Chapter 7: Cash Drawer Interface
result = FALSE;
if(result)
{
switch( m_nDrawerNumber )
{
case 1:
// set solenoid bit high, arm bit low
bMask = CD7402DRWR1SOLENOID;
break;
case 2:
bMask = CD7402DRWR2SOLENOID;
break;
}
// Read solenoid bit
if ( ReadIOPort(&oBytes, m_nIOPort) )
{
switch (dwState)
{
case ( STATE_RELEASE ):
// activate solenoid (open cash drawer)
// bit = 1 activates solenoid, = 0 de-activates
// Set the solenoid bit ON to energize, leave other bits alone
oBytes = oBytes | bMask;
oBytes = oBytes & CD7402ARM_ON;
result = WriteIOPort( oBytes, m_nIOPort );
sState = _T("STATE_RELEASE");
break;
case ( STATE_IDLE ):
// deactivate solenoid
oBytes = oBytes & (~bMask);
energize, leave other bits alone
oBytes = oBytes | CD7402ARM_OFF;
sState = _T("STATE_IDLE");
// write new solenoid bit
result = WriteIOPort( oBytes, m_nIOPort );
sBytes = sBytes | CD7402SELECT_GPI; // set solenoid bits and status
bit as inputs
// write new select with solenoid bits enabled as Inputs.
WriteIOPort( sBytes, m_nIOPort_select );
break;
default:
// Set the INVALID state configuration.
return FALSE;
}
}
// driving circuit arming bit,LOW for arming
// Set the solenoid bit OFF to de-

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents