×

Software A2007U

The A2007U can be operated by NFC on your smartphone and by USB. controlled by various software packages.

Smartphone operation

The software for the Android smartphone is available for download from the Google play store.

Download button for A2007U android app

USB operation

To use the USB interface, plug the connector in a computer. On the computer the FTDI driver is loaded and the USB interface is ready for use. On older versions of Windows and Linux the FTDI driver may not be available, if this is the case the driver can be found on the FTDI website and has to be installed manually.

Labview driver

The A2007U can be operated by NI LabView. This driver is provided for successful operation

The A2007U NI driver installation manual can be found on this page.

USB Command Line Interface

The A2007U is equipped with a USB port. The USB port can be used as a serial interface.

Setting serial interface:

Baudrate 9600
Databits 8
Parity N (none)
Stopbits 1
Flow Control No

List of commands and result on the CLI (Command Line Interface)

Display list of commands:

*HLP;

 Divize A2007U Help

   Command  Description                       Example
   *HLP;    Help                              '*HLP;'
  *VER?;    Version                           '*VER?;'
  *SER?;    Serialnumber                      '*SER?;'
   *SET;    Set mA Value (4, 4.3, 4550)       '*SET:;'
  *VAL?;    Get mA Value (x,xx)               '*VAL?;'
   *RST;    Reset device to power on value    '*RST;'
  *IDN?;    Device identity                   '*IDN?;'
   *PPR;    Enable/disable power supply       '*PPR:[0-1];'
  *PPR?;    Print status power supply         '*PPR?;'
   *MOD;    Mode, with parameters             '*MOD:::...;'
  *MOD?;    List active mode                  '*MOD?;'
   *SEQ;    Set Sequence step                 '*SEQ::::;'
  *SEQ?;    Get Sequence from RAM             '*SEQ?;'
   *LMT;    Set min/max limits                '*LMT::;'
  *LMT?;    Get limits                        '*LMT?;'
   *STS;    Write stat + sequence to EEPROM   '*STS;'
  *STW?;    Get website contact information   '*STW?;'
  *STE?;    Get email contact information     '*STE?;'

Available modes:
- MOD:0;        - Single fixes value (default)
- MOD:1:<time>; - Stairs, 4 - 8 - 12 - 16 - 20, with step time in 
- MOD:3;        - Sequence, according to SEQ table

[#OKE]

Display software version of the unit

*VER?;
[#OKE:v2.0.5]

Reset the unit to factory defaults

*RST;
[#OKE:12.00]

Show the serial number of the unit

*SER?;
[#OKE:0000012345]

Show the Device Identity

*IDN?;
[#OKE:A2007U:v2.0.4-1-g99ac105]

Show contact information website

*STN?;
[#ERR]

Show contact information eamil

*STE?;
[#OKE:info@divize.com]

Set the mA output

*SET:4000;
[#OKE:4.00]

Show the actual mA output value

*VAL?;
[#OKE:4.00]

Set the mA output to passive mode. Power is supllied by the loop.

*PPR:0;
[#OKE:0]

Show the mA output mode. 0 = passive operation, 1 = active operation.

*PPR?;
[#OKE:0]

Set the mA output to active mode. Power is supllied from the USB port to the loop.

*PPR:1;
[#OKE:1]

Show the mA output mode. 0 = passive operation, 1 = active operation.

*PPR?;
[#OKE:1]

Set the mA output limit. When the output limit is set the output can not be beyond the limit.

*LMT:4000:20000;
[#OKE:4000:20000]

Show the set limits

*LMT?;
[#OKE:4000:20000]

Setting the mA output to 3,5 mA below 4 mA will result in error

*SET:3500;
[#ERR]

Setting the mA output to 8,0 mA is allowed

*SET:8000;
[#OKE:8.00]

Set the mA output limit. 3000 and 23000 is maximum range, 3,0 to 23,0 mA.

*LMT:3000:23000;
[#OKE:3000:23000]

Show the set limits

*LMT?;
[#OKE:3000:23000]

Setting the mA output to 3,5 mA is possible with the extended range enabled

*SET:3500;
[#OKE:3.50]

Show the operating mode

*MOD?;
Mode 0, fixed value.
[#OKE:0]

Set mode to 1

*MOD:1:0;
[#OKE]

Show the operating mode

*MOD?;
Mode 1, Stairs 4 - 8 - 12 - 16 - 20.
[#OKE:1]

Show the sequence

*SEQ?;
[SEQ:INDEX:VALUE:DURATION:RAMP]
[SEQ:00: 4000:   10:0]
[#OKE]

Set mode to 2

*MOD:2:0;

Show the sequence

*SEQ?;
[SEQ:INDEX:VALUE:DURATION:RAMP]
[SEQ:00: 4000:   10:0]
[#OKE]

Show the operating mode

*MOD?;
Mode 0, fixed value.
[#OKE:0]

Set mode to 3

*MOD:3:0;
[#OKE]

Show the operating mode

*MOD?;
Mode 3, Sequence active.
[#OKE:3]

Set step 0 to 3 mA 1 second duration, no ramp (0=step, 1=ramp)

*SEQ:00:3000:100:0;
[#OKE]

Set step 1 to 12 mA 10 seconds duration, with ramp (0=step, 1=ramp)

*SEQ:01:12000:1000:1;
[#OKE]

Set step 1 to 20 mA 10 seconds duration, no ramp (0=step, 1=ramp)

*SEQ:02:20000:1000:0;
[#OKE]

Show the sequence

*SEQ?;
[SEQ:INDEX:VALUE:DURATION:RAMP]
[SEQ:00: 3000:  100:0]
[SEQ:01:12000: 1000:1]
[SEQ:02:20000: 1000:0]
[#OKE]

Show the operating mode

*MOD?;
Mode 3, Sequence active.
[#OKE:3]

Terminal emulation software

To send and receive the CLI commands a terminal emulation program is recommended.

Windows terminal emulation program

For windows we recommend TeraTerm terminal emulator. Easy and lightweight.

Linux terminal emulation

For Linux we recommend CuteCom.

PHP Example

As the A2007U current can be set by the USB interface, the current can be set by a program as well. For example with PHP. The program below reads the time and sets the current on the A2007U according to the current time, thus creating a 4-20 mA clock. The PHP-DIO module is necessary for direct reading and writing to the USB port.

<?php
/*
Script for use with A2007U the mA output indicates the time.
The scrip shall be executed from Cron. >Crontab -e and add the following line
* * * * * /usr/bin/php /home/user/Documents/php/php_serial/time.php >> /home/user/Documents/php/php_serial/time.log
*/

date_default_timezone_set('Europe/Amsterdam');

$Hours = date("H");
$Mins = date("i");

if ($Hours >= 20) {
    $Hours = $Hours - 12;
}

$current = sprintf('%02d%02d0', $Hours, $Mins);

echo "The time is " . $Hours . "." . $Mins . " => " . $current . PHP_EOL;

$cmd = '*SET:' . $current . ";";
//Optional command to set the output to loop-powered (4-wire) mode.
$set_output = '*PPR:1;';

echo "CMD = " . $cmd . " " . PHP_EOL;

$fd = dio_open('/dev/ttyUSB0', O_RDWR | O_NONBLOCK);
dio_tcsetattr($fd, array(
                  'baud'       => 9600,
                  'bits'       => 8,
                  'stop'       => 1,
                  'parity'     => 0,
                  'flow_control' => 0,
                  'is_canonical' => 0));
//Check if port is opened.
if (!$fd) {
    exit();
}

$length=0;
//send command to A2007U
dio_write($fd, $cmd);
sleep(1);
//Read result from A2007U
$input = '';
$pos = '';
do {
    $length_old = $length;
    usleep(50000);
    $input .= dio_read($fd);
    $length = strlen($input);
} while (($length_old <> $length) || ($length == 0));

echo $input;
echo "---------------------------------------------" . PHP_EOL;

dio_close($fd);
?>

Software upgrade.

The A2007U firmware is up-gradable via the USB connection. The following tools are necessary to upgrade the firmware.

mono project

STM32-flash tool (Windows)

Procedure:

  1. Install the STM32 flash tool. If not already installed as part of other software, install the mono project before installation of the STM32 flash tool.
  2. Click 'open' and select the .bin file for download
  3. Click 'port' and 'select port' to select the port the A2007U is connected to.
  4. Click 'add' to prepare the A2007U for download.
  5. Click 'connect' to connect the A2007U
  6. Click 'bottom' to transfer the firmware to the A2007U, this may take some time.
  7. Wait for the "done" message.
  8. Click 'disconnect' to close the port
  9. Unplug and re-plug (power cycle) and the new firmware is loaded.
  10. Connect to the A2007U with a terminal emulator.
  11. Enter the command *IEE; to initialize the EEPROM with the new software, and wait for [#OKE].
  12. Enter the command *RST; to reset the A2007U.
  13. Finished. The A2007U is now ready for use with new firmware.

Contact us by email if you encounter problems you think will be solved with upgrading the software. We can provide the new software free of charge.

© Divize b.v. ; February 1, 2016 Last update: February 14, 2021.

© 2006-2024 DIVIZE b.v.