I was trying to look for drivers to control the motor driver mentioned in the subject section. I couldn't find any drivers and I believe they haven't been made yet.
What's the best way to go about making drivers for a motor controller drive via an ethernet communication protocol? It would be really helpful if someone can provide a procedure, manuals, methodology or even some references that will ease my process.
Solved! Go to Solution.
I've communicated with Control Techniques drives using Modbus.
So download a Modbus library, or you might already have one in LabVIEW. Read the manual for the communications protocol. As I recall, Control Techniques would provide a basic User Guide, and also a more advanced, much larger Advanced User Guide for their various drive families.
Generally, the menu.parameter value would be the modbus register. So menu 5 parameter 6, for example, would be seen as 5.06 in the manual and read or write that parameter using holding register 506.
To get this Modbus functionality on my LabVIEW do I need to download the Real-Time module? I'm using LabVIEW 2020 but I do have a 2017 version as well.
No. The library will work with either LabVIEW code on the PC or on real-time controllers.
You can download the purple bannered library from JKI's VI Package Manager. It is called NI Modbus Library.
Or download the older library which I often still use from https://www.ni.com/example/29756/en/
I'm trying to read the value of a register (any register for verification) but I'm running into errors. Could you please suggest a standard template for writing this VI?
If you are running into errors, then it would help if you told us what the errors are. !!!
My personal preference is to not have a shift register on the error wire. Others might disagree. But otherwise what you have is the simplest implentation.
Tell us what the error message says. Show us a front panel so we know what are in the controls.
Is the controller configured to output Modbus? I remember there were some menu settings that control the communication with it.
As of now, I'm trying to read a few register values to verify the connection between LabVIEW and the CT drive. Here's the front panel and block diagram. Is there anything wrong with my inputs?
I'm having trouble figuring out the corelation between Modbus Application Data Unit and the starting address and number of inputs.
Right click on that and do Explain Error. I entered the number into Explain Error on the Help menu and got "Modbus Error: Illegal Function. This function is not implemented on the server."
So the controller doesn't seem to like the Modbus Read Holding registers command. Possibly the modbus is not enabled on the controller. Look in the Modbus communications section of the controller's manual.
The drive manual does say that the Unidrive M700 has a CT Modbus TCP/IP specification. Is there any setting I need to change to enable Modbus communication with LabVIEW?
I tired using the Modbus Master Example.vi and after I run the VI it says the connection was successful but anytime try to "Set Coils" or "Fetch Discrete Inputs" or "Set Holding Registers" or "Fetch Input Resistors" or "Fetch Basic Objects" the VI pops up an error as shown in the status message box on the front panel