LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicate with Modbus device using OPCLabVIEW.

Hi all,

I am using LabVIEW 6i with DSC. I want to connect Modbus device. At some other place I saw that this is very easy with OPCLookout server but we don't have this opc server toolset. So I want to communicate Modbus device using LabVIEW DSC only. Did any one had done it please help me out.

Thanking you.
Vishal
0 Kudos
Message 1 of 15
(7,378 Views)
.



Hi,

If you would like to take advantage of all the features of LabVIEW-DSC, you will have to use a "server" for your Modbus device. This will allow you to easily configure Tags and manage them better.

I suggest you either get the Lookout OPC Servers from NI, or shop around for other OPC Servers for Modbus.

Now, if you absolutely have to use LabVIEW-DSC without any server, you will have to code in G a "driver" which can talk to Modbus. I believe there's one free such driver available; please search this forum. Then, you will have to create Memory Tags and wire all the reads and writes to them from your driver. It ain't gonna be clean!

Regards,

Khalid 🙂



.
0 Kudos
Message 2 of 15
(7,378 Views)
Hi thanks for the reply.
In first para you are talking about some server. Is it OPCLookout / OPCLabVIEW server or anything else please let me know.
As far as the OPCLookout server is concern, we got it. But our excate requirement is as follows.
>>>>> We want to connect our modbus device with FP.
We have flow controller working with modbus protocol. this controller store some parameters. At particular time(daily) we want to get this readings in FP and then pass it to some other PC or main controller. But I am not aware how the lookoutopc server would work with FP. I think that if we could connect modbus with LabviewDscOPC server than DSC will take care for the communication ( Not sure & not know how, if u know please guide me). Due to this only I am ve
ry strict for the LabviewDsc.

In third pare u told about to make driver for modbus. Please guide me how could i do this. I tried to communicate with modbusdemobox (ni one) using serialport vis. but not able to communicate.

Please guide me.
Thanking you.

Regards,
Vishal
0 Kudos
Message 3 of 15
(7,378 Views)
.


What do you mean by 'FP?' Do you mean FieldPoint by any chance? Anyways, if you use the LookoutOPC Server for Modbus, you can directly read the Modbus parameters from time-to-time. You don't need any iontermediate 'FP.'

To use the LookoutOPC Server, it's pretty-straight forward; please consult your local NI Technical support and they will guide you thru' it.

Trying to write your own VI-based driver for Modbus is not easy and I don't recommend it. The time you'll spend working on it will be more expensive than what the LookoutOPC Server will cost you.

I suggest you get in touch with your local NI Tech support.

Rgds,

Khalid 🙂



.
0 Kudos
Message 4 of 15
(7,378 Views)
Thanks for the reply.
I am in touch with our local NI Tech support.We are the alliance member of NI. In our application we want to use the FP (Field Point) modules due to some constrains.

AT present I am using the modubus demo box and able to communicate with it using Lookout Opc server. Please let me know how could I communicate with it using LabviewDSC server only not using Lookout OPC server. As at last I have to implement this thing in to the FP for the real Applicaiton, which might not able to work with Lookout opc server configuration. If it could work please let me know the way it could work.

Hope our appliation is very much clearer to u now. If u still want soem clearification plz let me know so u could help me out. We have
to do some demo sort of thing using this configuration so plz do as fast as possible.

Thanking you.
Vishal
0 Kudos
Message 5 of 15
(7,378 Views)
.


I still do not uinderstand why you would want to access the Modbus I/O via FiedlPoint. Why don't you want to access the Modbus I/O directly via the LookoutOPC Server? Why does it have to be through FieldPoint?

Or, if the I/O is something FP can read, then why use Modbus?

Please give more details of your app. Thanks.

Regards,

Khalid 🙂



.
0 Kudos
Message 6 of 15
(7,378 Views)
We have flow controller situated in the field at different more than 50 locations all around the state. These controller follows the modbus protocols. From one control room we want to get reading of these controller at particular instance of time daily. As these controllers are in the fields and also in different places we found FP the most suitable option. If you have any other option plz let us know. Hope now u r clear with our need of FP RT. Plz let me know ur view for this application.

Plz guide me how to use LV DSC server with modbus, how to configure. I had tried to make one using serial vis but not able to communicate. Plz guide me how to make application specific driver that u was talking about

Regards
visha
l
0 Kudos
Message 7 of 15
(7,377 Views)
.


If the Modbus flowcontrollers have serial ports on them, you can use modems to connect to them and get the data. You'll connect one modem to each Modbus flowmeter and need one modem at your computer. This latter modem will dial out using the LookoutOPC Server to all the flow controllers in the field in a sequence and get the data. You can hang-up the phone line after getting the data, so you don't have to have a dedicated phone line. This seems to be a typical SCADA problem (and a typical SCADA solution!).

Were you planning on using the FPs with modems or via Ethernet? I don't see how FPs are helping you with this problem. Why not go directly to the flow controllers via LookoutOPCServer?

.
0 Kudos
Message 8 of 15
(7,377 Views)
Hi,
Write now I am concentrate on the LookOUt OPC server as per ur advise. I could able to configure the particular modbus device with in Look out. and able to communicate with it. But for getting the data I am using the LV. In which i have put while loop to get the data as look out took time to dial a number and then get the data. (plz see attached file. I have not attached the Lookout with it as Look out is available in the other PC). In this case if the communication fails then also i didn't get any information.
I want if the communication is established then only i should try to get the data or i should get the information of the communication status. How it could be possible.
As i wrote eariler
there are more than 5 Flow controller are there in the field and i have to get data from there once in a day.All the controller are Daniel Spectra 100 one.

Plz guide me how to solve this problem.
Regards.
Vishal
0 Kudos
Message 9 of 15
(7,377 Views)
__________

Hi,

I am assuming you're using the Lookout Protocol Drivers (LPD) with LabVIEW-DSC (LVDSC). In this case, LVDSC is the OPC CLient. So, you'll be creating Tags by browsing to the OPC Server (LPD) in the Tag Configuration Editor.

Here, make sure you create a Tag for CommFail member of your Modbus Object. This will give you the status of the connection to your PLCs. In your diagram, you can check for this CommFail bit before you start reading/writing to other Tags.

Hope this helps,

Khalid 🙂



_____
0 Kudos
Message 10 of 15
(7,377 Views)