LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Modbus TCP with VFD. Cannot establish connection / Error 56?? Any thoughts?

Solved!
Go to solution

Hi,

 

I am trying to establish connection to a VFD (Variable frequency drive) for university research testing purposes. My set up consists of:

---> LabVIEW (Master)

---> ABB ACS880 VFD (Slave) with FENA-01 Fieldbus Adapter

---> (ABB induction Motor)

---> (Internal Combustion engine)

 

First of all, I am new to the Modbus TCP protocol but I have gone through all the whitepapers by NI, I have read and followed all the instructions from both the manual of the VFD and the manual of the FENA-01 Fieldbus adapter. I am also fairly new to LabVIEW but I am confident I have the knowledge to create the VI needed.

 

I have created a simple VI that would be able to read a couple of registers from the VFD, which is attached below. The VFD is connected via Ethernet to the local ethernet network and the PC Master is connected to the same network. When I run the VI, error 56 appears, which as I have read from the other forum posts is about not getting any response within the given time period.

 

Things I have tried:

--> Checking all the cables are connected properly

--> Double checking the manuals

--> Checking the FENA-01 in the chasis, which gives indication of awaiting modbus request

--> Checking for any Gateway IP address but I did not find any,  so I expected I did not need to add it to the VFD parameters

--> Refreshing FENA-01 parameters which always results to "Offline" status

--> I also checked in Labview>Tools>Options where you check TCP/IP and it did not have port 502 written but I did not change it cause I had to leave the Lab at the time. The port number was something like 3363 (something like that I repeat)

 

Questions:

--> Do i need to specify a new device somewhere in LabVIEW or in the Control Panel?

--> Do I have to create a seperate VI in order to establish connection?

--> What does "send 1150 for Ready to Operate" and "send 1151 for Operating" mean for the control word?

 

I would be very grateful if someone had some information about this by the end of the week. I am running tight on my deadline and I cannot stand monitoring this VFD with the limited power of the local control mode.

 

Thank you in advance for any help. 

 

Neo

 

 

 

Download All
0 Kudos
Message 1 of 4
(4,802 Views)

@J-Omega wrote:

Questions:

--> Do i need to specify a new device somewhere in LabVIEW or in the Control Panel?

--> Do I have to create a seperate VI in order to establish connection?

--> What does "send 1150 for Ready to Operate" and "send 1151 for Operating" mean for the control word?


  1. No. You only need to write the code which will talk to the device.
  2. No. The code you have is enough for talking to the device - the New TCP Master VI would be the one which opens the connection.
  3. I don't know the specific device you're working on and don't have the manual, but presumably it means there's a specific register in the device whose value represents the state of the device (the address of that register will be written in the same page of the manual). Your sentence is incomplete, but from context I'm guessing the device is the one writing the state to that register and you're only expected to read it, but it could also be interpreted as something you should write. The two values you quoted are simply the values representing those two states (each Modbus register is a 16 bit value, so it's a value between 0-65535).

 

As for your actual question, I'm not really familiar with this particular set of VIs, but if you look at the error indicator, it lists the hierarchy of where the error happened, and you can see it was in the TCP Open function, so the most likely thing is that the device simply isn't listening on that port, presumably because you already opened a connection. What you would to do is simply take the wire representing the first connection that you opened and feed that as the input to the VI, and I'm guessing you won't get the error.

 

Edit - I see you don't have values in the loop, so I'm assuming you don't have any connection with the device. It's possible no error is shown in the indicator because the close VI clears it. I would suggest looking at errors within the loop. Also, look at the examples shipping with the Modbus VI package, which hopefully show how to more robustly handle connections (basically - if there's an error close and reopen). You should also ping the device, use external Modbus clients like Modbus Scanner to test and make sure the firewall isn't blocking you.

 

 

Also, get in the habit of placing some form of delay in your loops, as a loop without delay will max out the CPU. In your case, there probably are delays, such as timeouts, in the Modbus VIs, but you should start by adding one as default and then learn later when they're not needed.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(4,749 Views)

TST,

 

So as I understood since the control word is register (4)00001, which means address 0, I would just write 1150 to addres 0 and it would make the machine ready for operation correct?

 

I will try again today and update with any further info.

 

Thanks for your response, I appreciate your time.

 

Neo

0 Kudos
Message 3 of 4
(4,738 Views)
Solution
Accepted by J-Omega

Hi, the problem is fixed and this could be a solution for problems like these.

 

The IP of the drive was not on the same network as the Local Ethernet network connected to it. The IP of the drive was 192.168.0.16 and the network was on 192.168.1.1. Once the IP of the network was changed to 192.168.0.1 everything communicated properly.

 

I also pinged it after and showed communication.

 

Thanks for the response TST.

 

Peace,

Neo

0 Kudos
Message 4 of 4
(4,713 Views)