LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use the Modbus library to control a VFD that does not have a driver in Labview

I have very little experience in this area so any help will be greatly appreciated.  I am trying to use Labview to control pump speed via Fuji Electric’s FRENIC-Multi variable frequency drive.  I believe I can connect this to the computer using an RS-485 to USB cable. Once this is accomplished, the question lies in the software/programming requirements. Frenic provides their own drivers for this insturment, however I want to control using Labview.  Labview does not have any drivers for this product. 

 

From here, I know of two options.  1. Buy the DSC module, this is not practical soley for this use.  2. Use the modbus library.  In this case I would like to use the modbus library.

 

Can anyone help get me started?  I have downloaded the modbus library but not sure what to do with it,

 

Thanks!

0 Kudos
Message 1 of 6
(5,152 Views)

Three items to start with.

 

  1. You'll want to do a quick read of the modbus spec.
  2. The LabVIEW Modbus library uses NI-VISA functions to transfer data via serial port or ethernet.  Suggest a search of the NI website for info on NI-VISA. 
  3. Download the communications manual for the FRENIC drive.  It will contain a map of registers that you can read/write via modbus, settings for serial port and any modbus settings.

 

0 Kudos
Message 2 of 6
(5,135 Views)

I have not had to purchase anything special to do Modbus. The VISA VIs work just fine. The Modbus Register definitions from your vendor will tell you if you are reading/writing coils (single bit) or registers (16-bit). In the registers you can read input registers (16-bit) or read/write holding registers (16-bit). Plus the Modbus drivers on your slave device(your customers hardware) typically add 1 to register addresses that it recieves in a Modbus RTU packet (so you will ned to subtract one on your end). Otherwise it is like any serial device. You need to know the definition for a RTU to know how to pack the data to send to your customers device.

0 Kudos
Message 3 of 6
(5,128 Views)

I have located in the manuel what the software settings such as: bits per second, data bits, paraity, stop bits, and flow control would be.  I also have found information on the pin assignment.  Is this what you are refering to?

 

As far as the NI-VISA is concerned, I generally understand what this is.  I have opened random vi's in the modbus library and also looked at a sample vi for serial read and serial write.  It seems to me that the tools in the Modbus library would be used in conjunction with a program that I develop, is this correct?  I have also seen that there is basically some type of option to read, write and detect error in some of the sample vis.  However, not sure how to add in the actual control, to send the message to the VFD to increase or decrease the pump speed/

 

 

0 Kudos
Message 4 of 6
(5,126 Views)

You're on the right track.  You would write vi's that use the modbus functions to change settings on the drive and request data such as torque from the drive.  You would need to add some error handling  to deal with any errors that occured during an exchange with the drive.

 

0 Kudos
Message 5 of 6
(5,124 Views)

Sending controls to your VFD involves finding the register address where the VFD is "listening" for a command. For instance, on the ACS800 (ABB), the speed command reference is located in Data Set 1, Word 2. Sending the command as an unsigned 16 bit integer to the Modbus address 400002 allows the speed to be commanded. Thi is, of course, after having configured a Modbus server on the controlling PC with LabView.

 

You'll have to look at the documentation for your specific VFD to figure out how the manufacturer has chosen to do register addressing, but that's frequently included in a firmware/software manual. I admittedly have not used the Modbus library, preferring to use the DSC module. There are pros and cons to each choice, but the DSC offered some nice functionality that has been an advantage to my application development.

0 Kudos
Message 6 of 6
(5,099 Views)