Connecting to AT1000 devices
This section describes how to find and connect to AT1000 devices on the network.
Under the hood, all interactions with AT1000 hardware happens over TCP/IP transactions. In case of Stand-alone mode, commands are sent to localhost, in case of remote operation, TCP/IP commands are sent to the right IP address.
The JavaScript / Python modules takes care of these details, making the code totally portable between stand-alone and remote mode, without any modification needed.
Discovering AT1000 Devices​
Before a test sequence can be launched (controlling outputs and measuring inputs), and device needs to be found on the network.
The following code will list all devices found on the network and print their serial numbers in the console:
- NodeJS
- Python
import AT1000 from '@ikalogic/at1000';
let testers = await AT1000.findDevices(500);
if (testers.length == 0) {
console.log("No devices found");
process.exit(1);
}
// Loop through devices and print their serial numbers
testers.forEach((tester, index) => {
console.log(`Device ${index + 1}: Serial Number - ${tester.device.serial_number}`);
});
from ikalogic_at1000 import AT1000
devices = AT1000.find_devices(5) # Find devices with a 5s timeout
if len(devices) == 0:
print("No devices found")
exit(1)
# Loop through devices and print their serial numbers
for index, device in enumerate(devices):
print(f"Device {index + 1}: Serial Number - {device.device.serial_number
The following code will pick the first device in the list and create a tester variable that can be used to control the device. It'll also reset the device to its default state, which is useful if you want to start from a known state.:
- NodeJS
- Python
import AT1000 from '@ikalogic/at1000';
let testers = await AT1000.findDevices(500);
let tester = testers[0]; // Pick the first detected device
await tester.reset(); // Reset the device to its default state
from ikalogic_at1000 import AT1000
devices = AT1000.find_devices(5) # Find devices with a 5s timeout
tester = devices[0] # Pick the first detected device
tester.reset() # Reset the device to its default state
Some code examples in the next sections of this documentation will assume that a tester variable representing an AT1000 device is already created. The code to find an AT1000 device and create tester variable may not repeated in all example for simplicity and readability.