In the mini conveyor sorting system, LabVIEW acts as a Human-Machine Interface (HMI) that receives real-time data from Arduino Nano and transmits control commands back to the embedded controller. The communication is implemented using USB serial and VISA-based data handling.

image.png

Serial Communication Architecture

image.png

As shown in the LabVIEW block diagram, communication begins with:

  • VISA Configure Serial Port
  • Baud rate configuration
  • USB port selection

The system continuously monitors the serial buffer using Bytes at Port, ensuring that LabVIEW only reads available data.

This prevents partial-frame parsing and buffer overflow.

Data Reception and Parsing

image.png

Arduino transmits sensor data as raw comma-separated numeric values.

In LabVIEW:

  1. VISA Read captures the full string.
  2. Match Pattern validates data frame termination.
  3. Scan From String converts CSV string into numeric values.
  4. Parsed values are mapped to:
    • RED
    • GREEN
    • BLUE
    • OTHERS
    • HEIGHT (CM)
    • Conveyor Status

The block diagram clearly shows numeric conversion blocks feeding into indicator terminals such as:

  • RED COUNT
  • GREEN COUNT
  • BLUE COUNT
  • OTHERS COUNT

This structured parsing ensures consistent UI updates.

Indicator and State Handling

The block diagram uses Case Structures to control:

  • RUN indicator
  • STOP indicator
  • Color detection state (True/False logic)
  • Object detection validation

When detection is TRUE, the corresponding case block activates:

  • Color LED indicator
  • Counter increment logic

This prevents false increments during idle conditions.

Parameter Transmission from LabVIEW to Arduino

The right side of the block diagram shows numeric controls for:

  • Conveyor Speed
  • Minimum Height Detect
  • Minimum Height Object
  • Maximum Height Object
  • Delay Check

When RUN or STOP buttons are pressed, LabVIEW transmits command strings via VISA Write.

Commands include:

  • Start operation
  • Stop operation
  • Reset counter
  • Speed update

The RESET COUNT button triggers a confirmation dialog before sending reset command.

Communication Stability Measures

image.png

Based on the implementation:

  • Data reading only occurs when "Read" boolean is TRUE.
  • Transmission is separated from parsing loop.
  • Case structures isolate command execution from monitoring logic.
  • Baud rate is configurable from the front panel.

This design prevents:

  • Data overlap
  • Blocking UI execution
  • Serial buffer corruption

Engineering Insight

The integration of VISA Read, Scan From String, and structured case logic provides:

  • Deterministic parsing
  • Real-time visualization
  • Stable bidirectional control
  • Clean separation between monitoring and command logic

This architecture demonstrates a practical approach to PC-based industrial automation using LabVIEW and embedded controllers.

#Arduino#

#LabVIEW#

#EmbeddedSystem#

#SerialCommunication#

#IndustrialAutomation#

#HMI#

#AutomationSystem#

#ConveyorSystem#LabVIEW#

#EmbeddedSystem#

#SerialCommunication#

#IndustrialAutomation#

#HMI#

#AutomationSystem#

#ConveyorSystem#

#Arduino#
#LabVIEW#
#EmbeddedSystem#
#SerialCommunication#
#IndustrialAutomation#
#HMI#
#AutomationSystem#
#ConveyorSystem#
##
IoT Project

No comments yet. Be the first to comment!