Grafito CANStepper

CANStepper boards with firmware 1.18 or newer (current: 1.20) understand plain text commands on their USB port. LabVIEW talks to the board the way it talks to a lab instrument: open the COM port with NI-VISA, write a command such as ON or MOVE:ABS 1,90, read the reply.

You need only LabVIEW + NI-VISA and a USB cable. There are no drivers to install, no Python, and no background program to run.

LabVIEW / TestStand ──NI-VISA (USB COM port)──► CANStepper ══CAN bus══► more CANStepper boards

What you need

ItemNotes
CANStepper NEMA 17 board with firmware 1.18 or newer (1.20 recommended)Check with *IDN? (below). Older boards: install firmware 1.20 or use the Python gateway
5–24 V power supply (typically 24 V)USB-C carries data only; the board and motor need the main supply
USB-C cable to the PCWindows shows the board as USB Serial Device (COMx)
LabVIEW with NI-VISAAny recent LabVIEW. In the NI installer, NI-VISA is the only driver you need

Downloads

FileUse
GrafitoCANStepper_C3_fw1.20.binReady-built firmware 1.20 (app image). Flash at 0x10000 without compiling; also the CAN OTA image
boot_app0.binFlash at 0xE000 together with the .bin so the board boots the new image
GrafitoCANStepper_C3.inoFirmware 1.20 source (Arduino sketch)
scpi.hRequired header, the SCPI command layer. Put it in the same folder as the .ino
canstepper-scpi-gateway.zipOnly for boards on firmware 1.17 or older: PC gateway (Python 3.9+) that adds the same commands. See "Older firmware" below
CANStepper_Query.viLabVIEW 2026 starter VI: sends one command, shows the reply. Set VISA resource to your COM port

Quick start (5 minutes)

1. Connect. Power the board, then plug in USB. Open Device Manager → Ports (COM & LPT) and note the number in USB Serial Device (COM3). In VISA that port is called ASRL3::INSTR.

2. Say hello (optional, no programming). Open NI MAX → Devices and Interfaces → ASRL3 → Open VISA Test Panel. Under Configuration → I/O Settings, tick Enable Termination Character (Line Feed \n). On the Input/Output tab, write *IDN?\n and read. You should see:

Grafito,CANStepper NEMA17,NODE1,1.20

3. Run the starter VI. Open CANStepper_Query.vi. Set VISA resource to ASRL3::INSTR (your port), type a command and press Run (Ctrl+R):

SendReplyNote
ONOKthe motor starts turning at 90°/s
OFFOKthe motor ramps down and stops
ENAB 1,1;MOVE:REL 1,90;MOVE:WAIT? 1,1.5;POS? 1OK;OK;DONE;90.02turns 90°, waits, reports the position

The starter VI is shipped pointing at TCPIP0::127.0.0.1::5025::SOCKET (an older setup). Change VISA resource to your COM port, then right-click it → Data Operations → Make Current Value Default and save.

Build your own VI

Every command answers with exactly one line, so every VI follows the same pattern: write a line, read a line.

VISA Open (ASRL3::INSTR)
  → Property Node: Message Based Settings → Termination Character Enable = True
  → VISA Write "*CLS\n" → Wait (ms) 50 → VISA Flush I/O Buffer (mask 16)     ← start-up step, once
  → VISA Write "<command>\n" → VISA Read (byte count 1024) → reply           ← repeat as needed
VISA Close → Simple Error Handler
  • End every command with a line feed (\n). In LabVIEW, use Concatenate Strings with a Line Feed Constant.
  • The start-up step clears out anything left in the port by another program, for example a Python tool. It does nothing harmful on a freshly powered board.
  • Opening the port does not restart the board, so a VI can open and close the port as often as it likes.
  • Timeout: set the VISA timeout longer than any wait you ask for. For example, use 15 s if you send MOVE:WAIT? 1,10.
  • Keep the session open in a loop for operator panels; open-write-read-close is fine for single commands.

Commissioning a motor, step by step

Do this once for every new motor, with the axis free to move. Send each line from NI MAX's VISA Test Panel or the starter VI. The replies shown are what a healthy board returns. The copy button next to a command copies only the command, never the reply. Paste one line per run into the starter VI, and keep any MOVE:WAIT? time shorter than the VI's VISA timeout (2 s by default).

Step 1: Mechanics and wiring

  1. Mount the board on the back of the motor. The round magnet on the motor shaft must sit centred over the board's encoder chip, with about 1–2 mm air gap.
  2. Connect the motor's four wires to the board.
  3. Several boards: daisy-chain CANH, CANL and GND from board to board. Only the two boards at the ends of the chain keep their 120 Ω termination. On boards in the middle, remove the 0 Ω termination jumper. See Hardware → CAN bus rules.
  4. Endstop (optional): wire it to IO8 as shown in Hardware → Endstop wiring. IO8 must not be held low while the board powers up.

Step 2: Power up and connect

  1. Switch on the 5–24 V supply first (typically 24 V), then plug in USB.
  2. In Device Manager, note the COM number. In VISA the port is ASRL<n>::INSTR.
  3. Every board starts with the motor unpowered. The shaft turns freely until you send ENAB.

Step 3: Identify the board

SendReply
*IDN?Grafito,CANStepper NEMA17,NODE1,1.20
SYST:ERR?0,"No error"

No reply to *IDN? means the board has firmware 1.17 or older. Install firmware 1.20 or use the Python gateway.

Step 4: Give each board its own node ID (only if you use several boards)

Boards are node 1 unless they were numbered before. Two boards with the same ID on one CAN bus clash, so give every board its own ID. Firmware 1.20 does this with one command, SYST:NODE. The new ID is saved at once and kept after power-off and firmware updates.

The board on USB:

SendReplyNote
SYST:NODE?1ID of the board on USB
SYST:NODE 2OKthis board only; nothing is sent on the CAN bus
*IDN?Grafito,CANStepper NEMA17,NODE2,1.20

A board further down the CAN cable: give its current ID, then the new one.

SendReplyNote
SYST:NOD?1,2
SYST:NODE 1,3OKnode 1 on the bus becomes node 3
SYST:NOD?2,3

Only the board on USB needs firmware 1.20; the board being renumbered over the cable can run any CANStepper firmware.

Several new boards (all still node 1): renumber the board on USB first (SYST:NODE 2), then add the new boards to the cable one at a time, each followed by SYST:NODE 1,<new ID>:

SendReplyNote
SYST:NODE 2OKboard on USB
…connect the next new board, then:
SYST:NODE 1,3OK
…connect the next new board, then:
SYST:NODE 1,4OK
SYST:NOD?2,3,4

SYST:NODE refuses instead of guessing:

ReplyMeaning
ERROR 209,"Node 3 already on the bus"The new ID is in use. Pick another one
ERROR 201,"Node 1 not responding"No board has the old ID. Check SYST:NOD?
ERROR 210,"Two boards answer as node 1…"Two boards share the old ID. Unplug one, or connect each one by USB and use SYST:NODE <new>
ERROR 211,"Node 1 is moving…"Stop the motor first

To check whether another board on the cable uses the same ID as the board on USB, send SYST:NODE:DUP?: 0 is fine, 1 means a clash. SYST:NODE <new> then fixes it, because it changes only the board on USB.

Write the ID on a label on the motor. From now on, use that number in every command (ENAB 2,1, POS? 2 …).

Boards on firmware 1.18 or 1.19

These do not have SYST:NODE. Plug in one board at a time, with the CAN cable unplugged, and send these two lines exactly as shown. They are raw bus frames, not SCPI, and assume the board is currently node 1.

Unplug the CAN cable first

The board on USB also sends these lines out on the CAN bus. Every board on the bus with the same old ID changes its ID and saves it too, so two boards end up with the same new ID. Their frames then collide and the bus reports errors. Check with SYST:NOD? before you start: it must list only the board on USB.

New IDLine 1Line 2
249 0 01020000008B 0
349 0 0103000000CB 0
449 0 010400000010B 0
549 0 010500000014B 0
649 0 010600000018B 0
749 0 01070000001CB 0
849 0 010800000020B 0
949 0 010900000024B 0
1049 0 010A00000028B 0

Line 1 changes the ID and line 2 saves it. Then send *CLS, wait a moment, flush the read buffer, and check with *IDN?.

Step 5: Health check (motor still unpowered)

SendReplyNote
STAT? 10,0,0,0,x,0,1,0,07th value 1 = encoder OK, 4th 0 = no e-stop, last 0 = no fault
STAT:DRIV? 11,0,0,0,0,…first value 1 = driver chip answers
ALAR? 10,NONE
POS? 1104.502turn the shaft by hand, ask again: the number must change
STAT:TEMP? 138.3board temperature, °C

If the encoder value does not change when you turn the shaft, check the magnet (step 1) before going on.

Step 6: Set the motor current

SendReplyNote
CONF:CURR:RUN 1,30OKpercent of the driver's maximum; start low
CONF:CURR:HOLD 1,5OKcurrent while standing still

Start around 20–40 % and raise it only if the motor loses steps or cannot move its load. Above about 40 %, fit the driver heatsink. See Hardware → Cooling.

Step 7: First move and direction

SendReplyNote
ENAB 1,1OK
MOVE:REL 1,10OK
MOVE:WAIT? 1,5DONE
POS? 110° more than before

Watch which way the shaft turned. If positive moves should go the other way:

SendReplyNote
CONF:DIR 1,1OKsend CONF:DIR 1,0 to undo

Step 8: Speed and acceleration

SendReplyNote
CONF:SPE 1,180OK°/s, start gently
CONF:ACC 1,720OK°/s², deceleration is the same
MOVE:REL 1,360OK
MOVE:WAIT? 1,10DONE
POS:ERR? 10.04should be well under 0.35°

Raise speed and acceleration in steps until the motion looks right for the machine, repeating the 360° move each time. If MOVE:WAIT? reports FAULT,2,NO_PROGRESS, the motor cannot keep up. Lower the speed or acceleration, or raise the current.

Step 9: Units for a linear axis (optional)

SendReplyNote
CONF:UNIT 1,MM,8OK8 = millimetres travelled per motor turn
MOVE:ABS 1,25OKnow in mm

Speeds become mm/s and accelerations mm/s².

Step 10: Home position

With an endstop switch:

SendReplyNote
CONF:HOM 1,0,2,30OKkeep run current, back off 2 units, give up after 30 s
HOME 1,ENDS,-1,20OKtowards the switch at 20 units/s; use 1 for the other direction
MOVE:WAIT? 1,35DONE
HOME? 11

Press the switch by hand first and check STAT? 1: the 5th value must be 0 when released and 1 when pressed. If it is 1 with the switch released (or with no switch wired), the polarity is wrong: a released switch that leaves IO8 high needs CONF:ENDS 1,1,0,1 (active-low). Since firmware 1.19, HOME 1,ENDS refuses to start while the switch reads pressed and answers ERROR 208,"Node 1 endstop active: …", so a wrong setting can no longer report a false home. The endstop settings are reset at every power-up, so send CONF:ENDS in your start-up block.

Without a switch, move the axis to its reference point and send HOME 1,ZERO.

Sensorless homing (no switch, axis runs into a hard stop):

SendReplyNote
CONF:STAL 1,10OKstall threshold; higher = more sensitive
HOME 1,STAL,-1,90OKat least 60°/s; slower is refused with ERROR -222
MOVE:WAIT? 1,35DONE

The driver's stall sensor only works at speed: below about 45°/s it reports a stall even on a free shaft. Firmware 1.19 therefore uses at least 60°/s (default 90°/s) and ignores the start-up ramp. Check it on your machine: with the axis free, HOME 1,STAL,1,90 with a short timeout must end in HOMING_FAILED,2,HOMING_TIMEOUT, not DONE.

Step 11: Short endurance run

Repeat a typical move ten times, then check that nothing complained:

SendReplyNote
MOVE:ABS 1,360;MOVE:WAIT? 1,10OK;DONE
MOVE:ABS 1,0;MOVE:WAIT? 1,10OK;DONE
… (×10)
ALAR? 10,NONE
STAT:DRIV? 11,0,0,0,0,…2nd value 1 would mean "driver getting hot"
STAT:TEMP? 1compare with step 5: it should level off, not keep climbing

Step 12: Save, and know what to set at every start

SendReply
CONF:SAVE 1OK

The board keeps most settings after power-off, but for safety it re-applies a few defaults at every switch-on:

Kept after power-off (after CONF:SAVE)Set again by your program at every start
Node ID, speed, acceleration, microstepping, direction, PID gains, homing settings, closed loop on/offRun current above 40 % (capped to 40 % at power-up) and hold current above 5 %
Endstop settings (reset to enabled, active-high, stop-on-hit)
Units (CONF:UNIT)
Motor power: always off at power-up, so send ENAB n,1

A good start-up block for any test program:

SendReplyNote
*CLSthen wait 50 ms and flush the read buffer
*IDN?check NODE and firmware
CONF:CURR:RUN 1,60only if you need more than 40 %
CONF:UNIT 1,MM,8only for linear axes
CONF:ENDS 1,1,0,1only if your switch is active-low, see step 10
ALAR:CLE 1OKclears a leftover e-stop
ENAB 1,1OK
HOME 1,ENDS,-1,20OK
MOVE:WAIT? 1,35DONE

Commands

Commands are not case-sensitive. Words can be shortened to their capital letters (CONFigure:SPEed → CONF:SPE), and several commands can share one line separated by ;. The first number in most commands is the motor's node ID (1 for a single board). Positions are in degrees unless you change the unit.

Connection

CommandReplyMeaning
*IDN?Grafito,CANStepper NEMA17,NODE1,1.20Who is connected, node ID, firmware
SYST:NOD?1,2,3All motors found on the CAN bus
SYST:NODE?1Node ID of the board on USB
SYST:NODE 2OKGive the board on USB node ID 2 (saved; fw 1.20)
SYST:NODE 1,3OKGive the board that is node 1 on the CAN bus node ID 3 (saved; fw 1.20)
SYST:NODE:DUP?01 if another board on the bus uses the USB board's ID
SYST:ERR?0,"No error"Next error message, if any

Run, stop and move

CommandMeaning
ON · ON 1,180 · ON 1,-90Start turning (default 90°/s) · faster · reverse
OFFRamp down and stop (motor holds its position)
ENAB 1,1 / ENAB 1,0Power the motor / release it (shaft turns freely)
MOVE:ABS 1,90Go to 90°
MOVE:REL 1,-45Move 45° backwards from where it is
MOVE:WAIT? 1,10Wait up to 10 s for the move to finish, then answer DONE
JOG 1,30 / JOG 1,0Turn at 30°/s / stop
HOME 1,ENDS,-1,20Home onto the endstop switch, moving backwards at 20°/s
HOME 1,ZEROCall the current position zero
STOP 1Controlled stop
ESTOP:ALLEmergency stop, every motor. Power is cut and stays off until cleared

Settings

CommandMeaning
CONF:SPE 1,360Top speed 360°/s
CONF:ACC 1,1440Acceleration 1440°/s² (deceleration is always the same value)
CONF:MICR 1,16Microstepping 1–256 (powers of two)
CONF:CURR:RUN 1,40Motor current 40 %
CONF:UNIT 1,MM,8Work in millimetres on an 8 mm-per-turn lead screw (DEG, REV also possible)
CONF:SAVE 1Keep the settings after power-off

Add ? to read a setting back, e.g. CONF:SPE? 1 → 360.

Status

CommandReply exampleMeaning
POS? 189.934Real shaft position from the built-in encoder
VEL? 192.15Speed
ON?1Is the motor turning?
STAT? 11,0,0,0,1,0,1,0,0powered, moving, homed, e-stop, endstop, stall, encoder OK, mode, fault
ALAR? 10,NONEMost important active alarm
STAT:TEMP? 142.3Board temperature, °C

Recipes for common operations

Each block is a sequence of Write → Read steps. Replace 1 with your motor's node ID.

Turn continuously, change speed, reverse, stop

SendReplyNote
ON 1,60OK60 °/s; powers the motor if needed
ON 1,180OKspeed change while running
ON 1,-90OKreverse
OFF 1OKramped stop, motor holds position
MOVE:WAIT? 1,5STOPPED

Go to a position and check it

SendReply
ENAB 1,1OK
MOVE:ABS 1,270OK
MOVE:WAIT? 1,10DONE
POS? 1269.96
POS:ERR? 10.04

Index in fixed steps (e.g. 8 stations of 45°; repeat the block 8 times)

SendReply
MOVE:REL 1,45;MOVE:WAIT? 1,10;POS? 1OK;DONE;45.02

Back-and-forth cycling (repeat; count cycles in your loop)

SendReply
MOVE:ABS 1,180;MOVE:WAIT? 1,10OK;DONE
MOVE:ABS 1,0;MOVE:WAIT? 1,10OK;DONE

Linear axis in millimetres (lead screw 8 mm per turn)

SendReplyNote
CONF:UNIT 1,MM,8OK
CONF:SPE 1,20OK20 mm/s
HOME 1,ENDS,-1,5OK
MOVE:WAIT? 1,60DONE
MOVE:ABS 1,100OK100 mm from home
MOVE:WAIT? 1,15DONE

Jog buttons on a front panel: on button press send JOG 1,30 (or JOG 1,-30); on release send JOG 1,0.

Move several motors at the same time

SendReplyNote
MOVE:ABS 1,90OKall moves start immediately, one after another
MOVE:ABS 2,90OK
MOVE:WAIT? 1,10DONEthen wait for each
MOVE:WAIT? 2,10DONE

Data logging loop (e.g. every 100 ms while a move runs)

SendReplyNote
POS? 1;VEL? 1;POS:ERR? 1;STAT:TEMP? 145.2;89.7;0.31;41.8
MOVE:DONE? 101 when the move has finished

Emergency stop and recovery

SendReplyNote
ESTOP:ALLOKevery motor stops, power cut, latched
ALAR? 110,ESTOP_LATCHED
… make the machine safe …
ALAR:CLE 1OKrepeat for every node
ENAB 1,1OK

Adjust by hand, then define the position

SendReplyNote
ENAB 1,0OKshaft turns freely
… move the axis by hand …
ENAB 1,1OK
POS:SET 1,0OKthis spot is now 0; nothing moves

Back to factory settings (keeps the node ID)

SendReply
CONF:DEF 1OK

Replies you will see

ReplyMeaning
OKCommand accepted
a value, e.g. 90.02Answer to a question (?)
ERROR <code>,"<text>"Something was wrong; the text says what (table below)

MOVE:WAIT? answers with one of:

ReplyMeaning
DONEThe move finished at its target
STOPPEDStopped by STOP / OFF / JOG 1,0
ENDSTOPThe endstop switch was hit and stopped the motor
ESTOPAn emergency stop happened
FAULT,2,NO_PROGRESSThe motor could not reach the target (jammed or overloaded)
HOMING_FAILED,1,HOMING_TIMEOUTHoming did not find the switch (or stall) in time. 1 = endstop, 2 = sensorless
HOMING_FAILED,1,HOMING_SWITCH_ACTIVEHoming refused: the switch already read pressed (sent by older hosts; the SCPI command itself answers ERROR 208)
TIMEOUTStill moving when your wait ran out. Wait again, or send STOP 1

Example: automated test sequence

SendReplyNote
*IDN?Grafito,CANStepper NEMA17,NODE1,1.20
CONF:SPE 1,180OK
CONF:ACC 1,720OK
ENAB 1,1OK
HOME 1,ZEROOK
MOVE:ABS 1,90OK
MOVE:WAIT? 1,10DONE
POS? 189.934log it, compare with limits
MOVE:ABS 1,0OK
MOVE:WAIT? 1,10DONE
ALAR? 10,NONE
OFFOKclean-up: always run, also after an error
ENAB 1,0OK

In LabVIEW, build it as a state machine (Init → Configure → Test → Cleanup), passing the error cluster through every step. Each line above is one Write + Read. In TestStand, each line is one step.

Alarms and recovery

ALAR? 1 shows the most important alarm; ALAR:LIST? 1 shows all of them. Most alarms are cleared with ALAR:CLE 1, which stops the motor and powers it back on.

AlarmWhat it meansWhat to do
10,ESTOP_LATCHEDAn emergency stop was sentMake it safe, then ALAR:CLE 1
2,NO_PROGRESSThe motor could not follow the moveRemove the obstruction, ALAR:CLE 1, move again
4,DRIVER_OVERTEMPThe driver chip got too hotLet it cool, lower the current or add a heatsink, ALAR:CLE 1
5,DRIVER_SHORTShort in the motor wiringCheck the wiring first, then ALAR:CLE 1
1,ENCODER / 12,ENCODER_SIGNALPosition sensor problemCheck the magnet on the motor shaft, then home again
3,HOMING_TIMEOUTHoming did not find the switchCheck the switch wiring and direction, ALAR:CLE 1, home again
6,HOMING_SWITCH_ACTIVEHoming refused: switch already pressed (fw 1.19)Move off the switch, or fix the polarity with CONF:ENDS, then ALAR:CLE 1
11,STALLStall detectedClear, then home again

Error codes

CodeMeaningFix
202Motor not poweredSend ENAB 1,1. Boards start unpowered after switch-on
203Emergency stop is activeALAR:CLE 1
201A motor on the CAN bus did not answerCheck its power, CAN wiring and node ID
204The board refused a settingValue outside the allowed range
207An alarm is still active after clearingSee Alarms
208Endstop homing refused: the switch already reads pressedMove off the switch, or fix the polarity: CONF:ENDS 1,1,0,1 for a switch that leaves IO8 high when released
209SYST:NODE: the new ID is already in usePick a free ID (SYST:NOD?)
210SYST:NODE: two boards answer on the old IDUnplug one, or renumber each over its own USB with SYST:NODE <new>
211SYST:NODE: the motor is movingSTOP, then retry
-113Unknown commandCheck the spelling. SYST:NODE needs firmware 1.20
-109 / -108Too few / too many valuesCheck the command format
-222 / -224Value out of range / not allowede.g. node ID must be 1–31

Several motors on one cable

Connect the PC to one board. Every other board on the same CAN bus is reached through it by its node ID:

SendReplyNote
SYST:NOD?1,2,3
ENAB 2,1OK
MOVE:ABS 2,180OK
POS? 312.5
ESTOP:ALLOKall motors

ON and OFF without a number act on the board the USB cable is plugged into. Every board needs its own node ID: see Step 4.

Install firmware 1.20

Boards already on 1.20 need nothing; check with *IDN?. Boards on 1.18 or 1.19 work with every command on this page except SYST:NODE, but should be updated: 1.19 makes homing safe (see Step 10) and 1.20 adds SYST:NODE (see Step 4). To update a board, connect the main power supply, plug in USB and close LabVIEW, NI MAX and any other program using the COM port.

Option A: Arduino IDE (from source). Download GrafitoCANStepper_C3.ino and scpi.h into a folder named GrafitoCANStepper_C3. In the Arduino IDE install the esp32 boards package and the libraries FastAccelStepper and TMC2209. Choose board ESP32C3 Dev Module with USB CDC On Boot: Enabled, then click Upload. Full details: Flashing firmware.

Option B: ready-built file, no compiling. Use Espressif's browser flasher ESP Tool in Chrome or Edge. Connect at 115200 baud, then program both files in one go:

Flash addressFile
0xE000boot_app0.bin
0x10000GrafitoCANStepper_C3_fw1.20.bin

Do not erase the flash first. The board keeps its node ID and tuning. Unplug and replug USB afterwards, then check *IDN?.

Boards further down the CAN bus can also be updated over the bus itself with the same .bin. See Flashing → CAN OTA.

Older firmware: Python gateway

Boards on firmware 1.17 or older do not understand text commands themselves. *IDN? gets no reply, and VISA Read times out. You can either install firmware 1.20, which is recommended, or run the small SCPI gateway program on the PC. The gateway accepts exactly the same commands, so your LabVIEW program stays the same; only the VISA resource changes.

LabVIEW ──VISA TCP (TCPIP0::127.0.0.1::5025::SOCKET)──► gateway on the PC ──USB COM port──► board

Set it up (Windows):

  1. Install Python 3.9 or newer from python.org. In the installer, tick "Add python.exe to PATH".
  2. Download canstepper-scpi-gateway.zip from Downloads and unzip it anywhere.
  3. Double-click start_gateway.bat. The first run installs the library, which takes about 10 seconds.
  4. Type the board's COM port when asked (e.g. COM3) and press Enter. The window shows VISA resource: TCPIP0::127.0.0.1::5025::SOCKET.
  5. Leave that window open while LabVIEW runs. Closing it stops the gateway.

In LabVIEW:

SettingValue
VISA resourceTCPIP0::127.0.0.1::5025::SOCKET
Termination character\n, enabled, as for the COM port
Start-up step (*CLS, wait, flush)Not needed. It does no harm if left in

Check it:

SendReply
*IDN?Grafito,CANStepper SCPI Gateway,COM3,1.0/canstepper-0.2.1
ONOK
OFFOK

Differences to firmware 1.20:

  • SYST:NODE needs the old and the new ID (SYST:NODE 1,3); SYST:NODE? and SYST:NODE:DUP? are firmware only.

  • *IDN? names the gateway and COM port instead of the board.

  • ON / OFF without a number act on node 1.

  • The gateway holds the COM port. Close it before flashing the board or opening the port in NI MAX.

  • Try it without hardware: python -m canstepper.scpi --sim 1,2,3 --ack in the unzipped folder, after the first run of start_gateway.bat.

  • For test stands with one long LabVIEW session, start it with --stop-on-disconnect, so the motors stop if LabVIEW is closed or crashes: python -m canstepper.scpi --serial COM3 --ack --stop-on-disconnect.

Tips and troubleshooting

ProblemFix
VISA Open error -1073807343Wrong VISA resource. Use ASRL<n>::INSTR with your COM number
VISA Read times outCheck the termination character is enabled and you send \n. No reply to *IDN? at all means old firmware: install 1.20 or use the gateway
Gateway: VISA Open fails on TCPIP0::…The gateway window is not running, or was started with a wrong COM port
A motor answers only sometimes, SYST:NOD? misses a board, or moves go to the wrong motorTwo boards share an ID. SYST:NODE:DUP? checks the board on USB; see Step 4
First reply looks like 61 0 0000…Leftover data from another program. Add the start-up step (*CLS, wait, flush)
ERROR 202 on every moveThe motor is not powered: ENAB 1,1
COM port missing or busyMain supply on? Another program (NI MAX panel, serial monitor) still has the port open?
TIMEOUT from MOVE:WAIT?Give a longer wait, or slow the move down. The motor is still running

No Python required. Python users can keep using the Python library on the same firmware: the board switches automatically between Python and text commands. Command details for developers: Protocol reference.

On this page