if ( sResult )
{
if ( sBytes & bMask )
{
ResString = _T("CLOSED");
Result = DRAWER_CLOSED;
}
else
{
ResString = _T("OPENED");
Result = DRAWER_OPENED;
}
}//sResult
}
return Result;
}
//////////////////////////////////////////////////////////////////////////////
// CDevice7402::SetState
BOOL SetState( DWORD dwState )
{
// Fire cashdrawer mechanism by setting drawer to the RELEASE State.
// Can't open both cash drawers at the same time. Must set H/W mutex
// in OpenDrawerLIO() around SetState(RELEASE) and SetState(IDLE) to
// insure this.
// To engage solenoid, we must set the solenoid bit HIGH and the ARM bit
// LOW.
The ARM bit controls the external arming circuit to drive the
// solenoid.
CString sState;
DWORD bMask;
DWORD sBytes = 0;
DWORD oBytes = 0;
BOOL
result = TRUE;
// Read select register
// Solenoid GPIO bits and ARM bit have been set to input when not using.
if ( ReadIOPort(&sBytes, m_nIOPort_select) )
{
// solenoid bits
sBytes = sBytes & CD7402SELECT_GPO;
result = WriteIOPort( sBytes, m_nIOPort_select );
}
else
// Error logged in ReadIOPort
// bit = 1 means drawer CLOSED for DARLINGTON
and ARM bit as outputs, Low enables output
Chapter 7: Cash Drawer Interface 7-17
Need help?
Do you have a question about the realpos 70 and is the answer not in the manual?
Questions and answers