Battery Metric devices feature two digital Input / Output ports D1 and D2. They can be configured as either inputs or outputs.
D1 and D2 can be used to have the device control external circuitry or have external circuitry trigger step terminations to route the programmed routine as required. The I/O ports are configured and setup up when the battery test routine is developed. This is done in the XML routine file. See Programming section for more details on editing XML routine files.
In the example above D1 is configured as an input and D2 is configured as an output. D1 and D2 can be used independently. Use both as inputs, both as outputs or one of each. Default values for D1 and D2 when not in use is input.
Now that D1 is configured as an input, it can be referenced in a routing statement. Specify d1 or d2 next to the If tag in the routing statement. The routing statement number then gets assigned to the desired step. Now when the assigned step is operating, the device will monitor the value on D1 and generate step terminations as defined.
Since D2 is configured as an output it is assigned a digital value in the desired step next to the Dx_Level tag.
|Digital_x = input
(x=1 or 2)
|D1 and D2 used to control routing. Use by creating a routing statement with value set to “low” or “high”. Then assign the statement number as a term in the appropriate step. External equipment can now trigger step terminations to control the program routine.|
|Digital_x = output
(x=1 or 2)
|When D1 and/or D2 are setup up as outputs they can be used to provide digital signals to external equipment. Specify Dx_Level = 0 to output current sinking ground potential of 0V. Specify Dx_Level = 1 to output current sourcing potential of 5V.|
Do not apply external voltages when D1 or D2 are being used as outputs. When using D1 and D2 it is a good idea to use a series resistor (1KΩ) when connecting to the D1 and D2 port pins to avoid the potential of damaging the port in the event a conflict occurs. ex Connecting external +5V to a data port accidentally configured as an output.
D1 and D2 as outputs could be used to power LED’s. Use a current limiting diode of 470Ω. This is useful when developing or editing routines. Avoid applying voltages (high) to digital inputs when the Battery Metric device is off or during power on. Maximum current source or sink should be limited to less than 12mA.
Any assignment to the Dx_Level in a step will be ignored if the Dx port is being used as an input.
Syntax for assignments must exactly match the examples shown in these two screenshots. This is true for both the XML tags and the assigned values. If the XML file does not have the appropriate digital tags then just create them in the XML editor program observing proper syntax.
Digital inputs are expressed as either high or low in the routing statements next to the value tag. Digital outputs on the other hand are distinguished by 0 or 1 in the desired step parameter next to the Dx_Level tag.