03-27-2015
09:50 AM
- last edited on
04-21-2025
03:18 PM
by
Content Cleaner
Hello!
I have a power meter , WM14-DIN advanced power analyzer. I want to display different values , Kwh,VA,Kvar etc, from the meter in graphs in labview. I have just a basic understanding of Modbus RTU and the connection with RS-232. But I don't know how to make it work with labview. To my meter I have connected a converter Moxa TCC-100 ( see attachments) from RS-485 to RS-232, since my power meter only works with RS-485.
From the converter I have a RS-232 usb adapter( see attachment) to COM3 on my PC .
Maybe the easiest way would have been connecting this directly https://www.ni.com/en-us/shop/model/usb-485.html . But i havent bought it yet!
So now you know the connection setup, drivers for the usb adapter is installed and VISA drivers also. I haven't found any good examples explaining how you can do this with programming and sending adn reciving data.
I have googled around and found out that you should use VISA read/write blocks, and that there is a Modbus library you could use. I have installed the library but I don't know how to use them to communicate with my power meter.
I have a communication protocol to my power meter but I don't know how to use it.
I'm pretty much stuck and really dont know where to begin. But from my understanding of modbus, these kind of things should be easy to do, so I'm guessing it isn't too hard to learn.
Is there anyone that could explain how these thing work or if there is something that I could read or see?
Best regards Maurlind
Solved! Go to Solution.
03-31-2015 12:16 PM
Try simply using the configure serial port function and VISA read/write like in this example:
03-31-2015 12:41 PM
Hi SgtPeprLHCB!
I recently buoght a usb adapter to rs-485 ( see attachment)and will try it as soon as I recive it, and then try the example you linked. Since my last configuration did not work.
But this time I think it will, the only thing I see as a problem is to get the right information from the power meter. I know a should use a VISA write function to send the adress that I want to acess but I don't know how to convert the "Modicon adress" in my power meter protocol to a ASCII adress.
Beacuse just using a simple VISA read/write example won't give me what I want unless I tell it to do so.
What is the best way to do this? Maybe I want more tabs of information that gives me "KWh" and "var" and so on, then I must write more adress at the same time.
In short, I don't know how to get the right adress code from my powermeters modbus protocol ( see attachment).
Best regards Maurlind!
03-31-2015 12:47 PM
Maurlind,
I've never worked with Modbus before. I've done some LabVIEW with serial using a serial-to-usb adapter and the functions I mentioned. Using a serial-to-usb adapter creates a COM port on your PC and you use that as your "address" (VISA reference). I would assume this is the same for your adapter.
Regards,
SgtPeprLHCB
03-31-2015 12:59 PM
Maurlind,
Seems to me you'd use the COM port as the visa reference and you'd append the actual address of the device to the command
Regards,
SgtPeprLHCB
03-31-2015
01:18 PM
- last edited on
04-21-2025
03:18 PM
by
Content Cleaner
A search for modbus should have led you to this - https://forums.ni.com/t5/Reference-Design-Content/LabVIEW-Modbus-API/ta-p/3524019
You can do things with the regular VISA functions but why make it harder than it had to be?
04-01-2015 07:38 AM
Hi Maurlind,
I was wondering if you still needed help with the issue or if the above answers solve the problem?
Let me know!
Best regards,
Collin de Wit
National Instruments
Applications Engineering
04-01-2015 01:13 PM
Hi CollindeWit!
I'm wating for my delivery of a usb rs-485 adapter, until then Idon't have any more question. If i get it to work with that adapter I will respond with my soulution or I will ask for help again!
Thanks for all the replys and links to examples!
Best regards Maurlind
04-09-2015 06:28 AM - edited 04-09-2015 06:30 AM
HI Collin
I have a kiethley 2401 source meter and have installed labview 2014 in my computer(Windows 8.1). I want to configure keithley 2401 with labview so that I can make a program for certain operations. I am using serial port RS232. I am new at using both labview and kiethley source meter. Looking for help.
Regards
Sunil
04-09-2015 06:42 AM
@sunil75 wrote:
HI Collin
I have a kiethley 2401 source meter and have installed labview 2014 in my computer(Windows 8.1). I want to configure keithley 2401 with labview so that I can make a program for certain operations. I am using serial port RS232. I am new at using both labview and kiethley source meter. Looking for help.
Regards
Sunil
First download the drivers for your meter (this one should work). There should be an example in the drivers of how to use them. Start there.