AnalogueClaim |
Top Previous Next |
Message
AnalogueClaim <linenumber> [-input|-output] [-Reset <voltage>|-Leave] [–alias <alias>] AnalogueClaim <devicegroup> <devicename> [-input|-output] [-Reset <voltage>|-Leave] [–alias <alias>]
Originator
Client
Response
ClaimAccepted: <linenumber> ClaimRejected: <linenumber> <reason> SyntaxError: insufficient parameters to AnalogueClaim SyntaxError: invalid parameters to AnalogueClaim
For example, ClaimRejected: 112 is a non-existent line ClaimRejected: 5 is already claimed ClaimRejected: line 7 is not an input line
If you set an alias, you will also get messages concerning the success or failure of the alias command. You may also get a message of the form
ClaimAccepted: 5 (alias not set)
if the claim succeeded but the alias was improperly formed.
If you request a reset voltage, you may also get an additional message:
SyntaxError: invalid reset voltage (must be number with V suffix) Error: requested reset voltage is out of range
Response (immediate socket)
Success Failure
If you request an alias, you will only get Success if the alias command also succeeds.
Details
Claims analogue line linenumber for input or output. Lines are numbered from 0.
By default, output lines are set to 0 V. If a 'reset' voltage is specified, output lines are set to that voltage. or if 'reset' is specified, output lines are turned off. If 'leave' is specified, the output line is left in its current state.
Input | output. Whether a line is an input or an output line is not determined by this parameter, but by the configuration of the server (which you can set, on the server, depending on how you wire up the apparatus). This parameter is merely a statement of your intent. You do not have to specify 'input' or 'output' when you claim the line. However, it is advisable. If you claim an input line and subsequently try to set its state, you will get an error message. It is better to state when you claim the line that you think it is an output line; if you are wrong, then the error message comes immediately and you know things aren't safe to proceed.
Reset | Leave. If you specify a 'Reset' voltage and the line is an output line, it will be set to this voltage immediately, and when the client gives up the line. If you specify 'Leave', it will be left in its current state, whatever that is. The default is a reset voltage of 0 V. (Note that it is only possible to set the reset state when you claim a line, and not later; this is deliberate, as it is meant as a safety feature and not to be fiddled around with willy-nilly.)
The voltage parameter must be specified in volts (not mV) and followed by a 'V' (with no preceding space). It may be positive or negative. If it is not possible to set the line to the requested voltage, an error will be generated and the closest possible voltage used.
Server device names. If you use the second form of the command, the line specified by the combination of the devicegroup and devicename parameters is claimed.
Example
AnalogueClaim 3 -output -reset -0.150V -alias echemProbe
Revision history
Implemented in WhiskerServer version 2.6.8.
|