Controlling a VFD in Labview?
April 4, 2011 1:18 PM   Subscribe

I'd like to control a VFD (Hitachi L100) by computer via a LabView program.

I wrote a VI in Labview that monitors temperature conditions in an environment via a thermocouple attached to a DAQ board.

My end goal is to use analyze the trends so that the fan is automatically triggered/throttled depending on the varying conditions in the environment.

It seems the first road block is that the L100 has a RJ45 connector that can be used to connect to a computer, but requires a "ConverterCable that is difficult to obtain and costly. I'd like to try and make my own, but I think the protocol Hitachi uses is proprietary and not available. The best I've been able to find is this

Then, if I were able to connect the VFD to the computer with such a cable, it sounds like the ModBus library for Labview is what I would need to interface with the VFD, but I can't find a good place to start learning how to use Modbus.
posted by gzimmer to Technology (2 answers total)
I've never used Modbus with LabView (or LabView at all, for that matter), but Modbus is a very simple protocol. Basically, Modbus allows you to read and write "registers" from a device. Registers come in four flavours - 0x, 1x, 3x and 4x. 0x, or "output coils" are read-only single bits (i.e. 0/1, on/off, etc). 1x, or "input registers" are read/write digital bits. 3x are read-only 16 bit registers. 4x, or "holding registers" are read/write 16 bit registers. The 3x and 4x registers can be used to hold signed/unsigned integers (in a single register), or longs/floating points (in 2 consecutive registers).

In the Modbus protocol, there are a number of different "function codes" you can use to read or write these different register types. I'd assume that in LabView, you don't need to worry about these function codes - the driver will take care of it for you.

Common Modbus function codes
Code Description
01 Read coil status
02 Read input status
03 Read holding registers
04 Read input registers
05 Force single coil
06 Preset single register
07 Read exception status
15 Force multiple coils
16 Preset multiple registers
17 Report slave ID

Each Modbus device that you communicate to will have a "Modbus ID" or "slave ID" ranging from 1 to 247.

To communicate to the VFD, you can either use the cable you linked to above, or you can cobble your own together using a USB-RS-422 converter (or a RS-232-422 converter, if your laptop has a serial port), plus a custom made cable to connect the converter to the VFD RJ-45 port. I use one of these, from B&B Electronics.
posted by skwm at 1:37 PM on April 4, 2011

Here are several more sources for USB-to-RS422 converters:

One advantage to the Hitachi cable is that it's pre-assembled and (supposedly) guaranteed to work... with serial devices, there's more art than science to getting 'em to talk to each other! And that's at the hardware level, before you try to figure out the modbus protocol if that's what Hitachi's using.
A simpler approach might be to use an analog voltage output, if you have one available from the DAQ card you're using, to control the VFD through its potentiometer control (command voltage) terminals. Labview likes to work that way pretty well; I haven't looked closely at the L100 documentation but all the VFD's that I've worked with play that way.
posted by drhydro at 3:08 PM on April 4, 2011

« Older At what point do I just give up and get a new...   |   Restaurant for group meetup in Manhattan? Newer »
This thread is closed to new comments.