Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated

How Can I Configure the Number of Stop Bits for My Modbus Master?



Primary Software: LabVIEW Modules>>LabVIEW DSC Module
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Modules>>LabVIEW Real-Time Module

Problem:
When using the LabVIEW Modbus API to create a Modbus Serial Master, I do not have the option to configure the number of stop bits. How can I configure the number of stop bits to the appropriate value?

Solution:
The Modbus Serial protocol specifies that if no parity is used there should be 2 stop bits and for both even and odd parity, 1 stop bit is used. The LabVIEW Modbus Serial Master API will follow these guidelines for setting the stop bits of the serial interface. So if the Slave device follows these rules, there is not need to explicitly set the number of stop bits. However, some Modbus Slave devices so not follow this convention so it becomes necessary to manually change this value.

If required by the Slave device, the number of stop bits can be manually configured using a Property Node targetting the Stop Bits property.



By doing this, the Create Master Instance VI will still set the stop bits to value specified by the standard but will then immediately be overwritten to the user-defined value.


Related Links:

Attachments:





Report Date: 09/29/2017
Last Updated: 10/05/2017
Document ID: 7PSF4PH9

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit