11-17-2016 02:01 PM
Hello, all. I need some help. So I would like my computer to control this VFD (Kinco) I'm using, so I made a VI that would allow LabVIEW to communicate with it, but I can't seem to change the frequency of the VFD. I know it is communicating with it. I made it so that when my numeric output is less than or equal to 50 (50 being the upper frequency limit), I can extract the frequency output (this vi will be used with another vi that will read the frequency output and use it for data acquistion). I'm certain it works because when my VI runs, the serial to usb connection that connects my computer with the vfd emits a green light when the numeric output <= 50, but if it's more, the light stops. I've read the manual and tried some function codes that I thought would work but didn't. I'm stuck. Here's the VI
11-17-2016 02:27 PM
It sounds like it is doing what you programmed it to do!
I'm not sure what you mean by "numeric output". You have a numeric control that you multiply by .01 and if that result is less than 50, it writes out a value and reads a response back. And if it is >50, does nothing with the serial port.
11-17-2016 03:27 PM
Hi chromatic,
Im not sure what problem youre having with your program is either, but looking at it i can offer you some advice and suggest looking in to when and when not to use bytes at port and how to properly use it when needed. Take a look at this thread from a few months ago.
11-17-2016 08:08 PM
Thaat is good to know. I just assumed that something was wrong, since I tried to change the frequency of the VFD from LabVIEW, but nothing happens. I tried changing the control settings of the VFD (there's 3; one is panel, one is terminal, one is Modbus), so that my VI would do that, but nothing works. I guess the problem is trying to figure out which function codes I need to set for the VFD so that my VI can control it.
RavensFan - Yes, I meant numeric control. Sorry for the confusion.
Wolleee - Thank you for the thread link
11-18-2016 12:46 AM - edited 11-18-2016 12:48 AM
A led blinking or lit at a RS232-USB adapter does not mean you have a meaningful communication or not 🙂 In your VI you just send a numeric value via VISA Write, and Read back some bytes at port. Why do you expect this method should work? Why do you think a VFD just accepts a value you send to it without any synthax, and it will send back a frequency value?
First of all you should specify your VFD model (you only wrote it is a Kinco brand), and read its manual! I just googled for Kinco VFD manuals, and what I have found showed you have to program it using Modbus protocol. Can you show us the manual? The manual should show you what kind of protocol you can use, and how to form your data what you send, and how to read information back...
11-18-2016 09:37 PM
I have downloaded the Modbus library that NI provided as well, and I'm not entirely how I can go about using the library to create a VI that will allow me to do what I want it to do. Would I need the Modbus functions and VISA functions together in one VI, or would the Modbus library have all I need? It seems that New Serial Master and Write Single Coil are some of the functions I would need to change the VFD frequency, but there's also the matter of reading said frequency and displaying on LabVIEW? Here's the manual.
11-19-2016
02:39 AM
- last edited on
08-19-2024
02:21 PM
by
Content Cleaner
Well, first read the manual, and also this doc: https://www.ni.com/en/shop/labview/introduction-to-modbus-using-labview.html
I have never worked with modbus, but I guess these two docs are enough to get started...
11-19-2016 10:23 AM
The modbus library uses the VISA functions. It is not an either, or, or both situation. Modbus library uses VISA.
You will need more than write coils which is a function used to set boolean registers. For writing a frequency, you'll need to use Write Holding Registers, or Preset Single register, or something like that. To read, you'll need Read Holding Registers. (Perhaps Read Input Register.)
11-21-2016 12:54 AM
Sorry for the late reply.
Blokk - thank you for the link. I think this will help a lot.
RaversFan - I'll be sure to read up on how to apply those functions for my VI. Thank you for the advice.
I'll get back to you for any updates on the VI.
11-21-2016 01:22 PM
So I ran into some problems.
1.) So I made an Modbus I/O server, where I configured the serial port I needed (COM3), and begin to create bounded variables for the VI that I had made. Whenever I ran it, an error popped up saying, "The Modbus I/O server failed to send a frame. Ensure that the configuration of the specified serial port for modbus master is correct." (1967353911). I don't know what's going on.
2.) I figured since I configured the server for COM3 this, perhaps my previous VI may work. I obtained another error when I ran it, saying "The resource is valid, but VISA cannot currently access it" (1073807246).
I have since deleted that VI from the project and am using the VI with the 1967353911 error. Here is what I did. For the VI, I tried using "write single holding register" and "read holding register". I figured I would write the value I want into the variable shown in the VI, copy the variable and have it set to a read mode, put it into the write single holding register, and have that value read with the read holding register. I'll continue to work on this, but any feedback you can provide is greatly appreciated.