Serial I/O FAQs

NI Vision Builder

Communicate

Serial I/O FAQs

Q: Why is my device not responding to the serial commands?

On your PC, make sure that your serial port settings in Measurement & Automation Explorer (MAX) match the serial settings for your device. Follow these instructions to configure your serial port settings:

  1. Launch MAX.
  2. Expand Devices and Interfaces.
  3. Expand Ports (Serial & Parallel).
  4. Right-click your serial port name in the configuration tree to configure your port.

When using a remote target, you can setup the Serial Port Settings by selecting Target»Target Options, and choosing the Serial Port Tab.

Note  You must have NI-VISA installed to communicate with serial devices.

Check your device manual for the type of serial cable you need to communicate with the device. Some devices require straight-through cables while others require crossover cables.

Make sure you select the serial port connected to your device when sending and receiving commands.

Q: How can I verify that my serial port is working correctly?

Refer to Serial Communication Starting Point for information and troubleshooting tips.

Q: How do I send a serial command based on the result of an inspection?

At the end of your inspection diagram, add a Logic Calculator step that computes the AND of all the step statuses. Then, add a Serial I/O step after the Logic Calculator step to send a serial command based on the Step Status of the Logic Calculator step.

Note  The AND of all the step statuses equals the Inspection Status.

Q: How can I set up my remote target serial port configuration?

Navigate to Target»Target Options»Serial Port.

Q: Why are commands not executed when I click the step in the State Configuration window?

In Configuration mode, commands are executed only when you click one of the following buttons:

  • Run Inspection Once
  • Run Inspection in Loop
  • Run Inspection until Failure

Vision Builder AI does not execute the step when you click on the step to avoid potential timeouts associated with the step.