Example Code

Trinamic TMCM-1110 StepRocker Command and Response VI

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

    Driver

  • NI-VISA

    Programming Language

  • LabVIEW G

Code and Documents

Attachment

Description

This program does nothing new with regards to writing commands to the TMCM-1110 compared to what Trinamic provides. It does allow the user to read the reply. The user will need to download the "TMCM-1110 TMCL Firmware Manual" from Trinamic in order to enter the appropriate command codes and to interpret the response. The Trinamic driver should also be installed.

 

The Build Command.vi replaces Trinamic's "calculate CRC.vi", "decimal to hex.vi" and "value in hex to 4 decimals.vi". It is unclear why they did not combine them into one VI. Particularly since they seem to encourage sloppy and unreadable programs.

 

The ability to read a reply allows full use of the StepRocker board. It allows the user to

  • Detrmine the board configuration
  • Query the end of a move
  • Read DIO pins
  • Read ADC channels
  • Read Home and limit switches
  • Read an encoder

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.