1 programming interface definitions – Metrohm 846 Driver Toolbox User Manual
Page 27

3.1 Programming interface definitions
Dosing Interface USB Toolbox, Annex
23
throw new DosInt-
Face846Exception(DosIntFace846Exception.getErrorString(nReturnstate), nReturnstate);
}
/**
* Prepares the Dosing Unit for exchange. The cylinder is filled from the specified port
and then the valve disk is
* turned to port 2.
* This action can be held and continued, but not stopped.
*
* @param ifNo Dosing Interface [1... ?]
* @param msbNo Dosino at MSB [1... 4]
* @param port Fill port [1..4]
* @param revRate Filling rate [0.01... 166 mL/min]
* @throws DosIntFace846Exception
*/
public static final void duExchange(int ifNo, int msbNo, int port, float revRate) throws
DosIntFace846Exception{
int nReturnstate = DosIntFace846.callExchange(ifNo, msbNo, port, revRate);
if (nReturnstate != 0)
throw new DosInt-
Face846Exception(DosIntFace846Exception.getErrorString(nReturnstate), nReturnstate);
}
/**
* Reads the state of a Dosino drive.
*
* @param ifNo Dosing Interface [1... ?]
* @param msbNo Dosino at MSB [1... 4]
* @return 0 = Dosino is ready to execute a function,
* 1 = Cylinder is being filled,
* 2 = Dosino is executing Exchange function,
* 3 = Dosino is executing GoPos function,
* 4 = Dosino is executing ZeroAdjust function,
* 5 = Dosino is executing Adjust function,
* 6 = Dosino is executing Cock function,
* 7 = Dosino is executing ToEnd function,
* 8 = Dosino is executing MakeStep function,
* 9 = Dosino is executing Prep function,
* 10 = Dosino is executing Empty function,
* 11 = Dosino is busy,
* 12 = Dosino is halted while filling,
* 13 = Dosino is halted in Exchange function,
* 14 = Dosino is halted in GoPos function,
* 15 = Dosino is halted in ZeroAdjust function,
* 16 = Dosino is halted in Adjust function,
* 17 = Dosino is halted in ToEnd function,
* 18 = Dosino is halted in MakeStep function,
* 19 = Dosino is halted in Prep function,
* 20 = Dosino is halted in Empty function,
* 21 = Dosino has timed out,
* 22 = Dosino status is undefined
* @throws DosIntFace846Exception
*/
public static final int status(int ifNo, int msbNo) throws DosIntFace846Exception{
dosinoState = 22;
int nReturnstate = DosIntFace846.callStatus(ifNo, msbNo);
if (nReturnstate == 0)
return dosinoState;
else
throw new DosInt-
Face846Exception(DosIntFace846Exception.getErrorString(nReturnstate), nReturnstate);
}
/**
* Stops the current Dosino action.
*
* @param ifNo Dosing Interface [1... ?]
* @param msbNo Dosino at MSB [1... 4]
* @throws DosIntFace846Exception
*/