How Can I Build a 64-Bit EXE When Using Modbus API?

Updated Feb 27, 2023

Reported In

Software

  • LabVIEW 2017 Datalogging and Supervisory Control Module
  • LabVIEW 2017 Full

Operating System

  • Windows

Other

Windows 8

Issue Details

I want to build a 64-bit EXE for distribution, and my program is going to use Modbus API from Datalogging and Supervisory Control (DSC) Module. As to build 64-bit EXE, LabVIEW 64-bit is required and DSC module is not supported for LabVIEW 64-bit, then how can I accomplish this?

Solution

It's not possible using DSC module, as DSC module support for LabVIEW 64-bit is not available.

However you can use Modbus library provided by SAPHIR from this link MODBUS Library for LabVIEW .
It provides Modbus communication from any standard Ethernet or serial port. Using the Modbus library, Programmable Automation Controllers (PACs) can communicate with gateway devices that provide connectivity to a wide variety of industrial networks, such as PROFIBUS, EthernetIP, and DeviceNet. 

In order to use the Library in LabVIEW, please follow these steps:
  • Close LabVIEW.
  • If you have version NI-MODBUS Library 1.1 on your system, it is recommended to uninstall it by going to Control Panel -> Add Remove Programs -> National Instruments Software and select NI Modbus 1.1 from the list.
  • Copy NI Modbus.llb from the ##\vi.lib folder to the LabVIEW_ROOT\vi.lib directory where ## is your LabVIEW version (example 86 for 8.6) and is the root folder where you installed LabVIEW.
  • Copy lvmodbus.chm and lvmodbus.txt from ##\help to the LabVIEW_ROOT\help directory.
  • Copy nimodbus.mnu from ##\user.lib to the LabVIEW_ROOT\user.lib directory.
  • Restart LabVIEW. You should see the NI Modbus palette in the User Libraries palette.
  • To Uninstall the Library, remove all the files copied from the previous steps.

Additional Information

In general, for Windows OS, 64-bit variant of LabVIEW gets installed in "Program Files" folder of C drive, and 32-bit variant of LabVIEW in "Program Files (*86)" folder of C drive, unless user have chosen different location during installation procedure.
So make sure you that place Modbus library files at "correct" location for 64-bit LabVIEW.