LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Eurotherm 2704 connection via serial port with ModBus

Hello guys,

first some words about my problem:

 

I have to develop a software which allows reading and writing the temperature (we have 3 Eurotherm 2704) (I think some of you know this problem yet 🙂 ).

I wrote already the program and it works, but I used "iTools OPC Server" for my program and it was the demo version (works only 30 minutes). The group doesn't want to pay for the iTools, I should solve this problem without iTools :(.

 

In this forum I found out, that I can use the ModBus for it:

http://forums.ni.com/ni/board/message?board.id=170&thread.id=468139&view=by_date_ascending&page=2

 

I know, there are some similar threads here, but I am new with LabView and need some help.

I downloaded one example “my modbus serial query.vi “

http://forums.ni.com/ni/board/message?board.id=170&thread.id=135288&view=by_date_ascending&page=2

but it does not work (I am not really sure, what I have to change in the file)

 

With OPC Server I found out:

 

COM5

Baud Rate 9600

Parity: None

Flow Control: None

Data Bits: 8(RTU) (I can choose RTU, but where can I change to 8 bit ?! )

 

And by other properties, I have no idea what I have to change there

 

For Example

 

Modbus Data Unit In (all read and write mode ? Which one do I need to read the temperature and to set the set temperature?)

Modbus Command ?!!!

No idea.

 

I have folowing adresses (comms address 0x00030001, canonical address: 1)

Which one do I need ?!

 

I think if I get the signal from one temperature controller, I can do it for other, but my problem is now THIS one.

Can you help me whit it ?

Should I use a other example ?! Maybe do you know better one?

 

 

Thank you, very much.

Alexander

0 Kudos
Message 1 of 14
(9,628 Views)

Nobody ?!

 

It is possible to get / set data from / to Eurotherm Controller with VISA ?!

 

Kind Regards: Alexander

0 Kudos
Message 2 of 14
(9,605 Views)
Can you be more specific when you say that it doesn't work. Do you get an error message, what?
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 14
(9,595 Views)

Hi alexphysiker,

 

I would firstly like to verify that I have understood your question correctly, you are trying to somehow communicate with and control your Eurotherm 2704 controller with LabVIEW? Is this correct?

 

I have found the following two forum posts that I think may be of use for you:

 

How to command RS485 with LABVIEW?

 

Acquiring data from Eurotherm 2704

I certainly recommend that you take a look at these links. Let me know if you have any more questions.

Best Regards,

Christian Hartshorne

Applications Engineer

National Instruments

0 Kudos
Message 4 of 14
(9,591 Views)

The threads referenced aren't particularly useful, one is a mostly incoherent discussion about connecting RS485 ports, the other basically says use the iTools that you have said aren't an option. The suggestion of looking at a different driver from Eurotherm has merit, I looked at the one for the Eurotherm et3500 and it uses modbus. Not a guarantee, but it will show you how someone else did it. I've found that manufacturers frequently do things similarly across a product type, not always though. If you can get a manual for your instrument that shows the Modbus Register Map, or something of that type, it will give you information on what registers to write and read.

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 14
(9,568 Views)

Hello Putnam and Christian,

I think the problem because you can not understand my question is my English, sorry 🙂

I'll try it again: 

 

@Christian:

Thank you for the links, but I think all threads in NI Forum with topic "Help, Eurotherm 2704 ?" were written by me 🙂

 

 

 

You understood my problem correctly.

We have 3 temperature controllers and I have to develop a LabView program, which allows reading the temperature from the controllers. It should be possible to write the set temperature from LabView to temperature controller as well.

The controllers are connected already (I think with RS485) and I can read/set the data from/to controllers (with “iTools OPC Server”), but I have to change my program so, that it works without “OPC Server”

 

@Putnam:

In the meantime I found out, why I got an error with  “my modbus serial query.vi” (the solution was very simple, I had to close the OPC-Server ). 

It runs now and I try to understand now how the VI exactly works. 

 

Maybe you can help me with it? 

 

I try to explain what I understood, if something is wrong, tell my please: 

 

The “my modbus serial query.vi” allows to read the multiple values (maximum 125 register) (default block read size is 125) from controller (I can see the data in the register array). In each register I have values for different variables. The Modbus address of Loop1 PV (I need this value) is known ( 00001, Eurotherm manual).

 

Does it mean that the first element in the register-array is the value for the temperature from Loop 1 ?! (multiplicated by a factor, if it is correct, how can I find out this factor? It is linear?)

And if I need the value of Loop2 (the address is 01025), I have to set the start address for example to 1000 and in this case the 25-th element in register-array is the value for PV Loop 2 ?! 

 

I got this idea, after I left the laboratory and could not try it out. I can do it first at Monday, but I would know if it is correct what I think.

 

If it is correct, I think I will able to change  “my modbus serial query.vi” on my own, that it works in my program.

Or there is a better example/solution than “my modbus serial query.vi” ?!

 

 

The other problem would be writing of temperature, but I will ask about it later :). First temperature READING problem!!  

 

Thank you! 

 

Alexander.

Message Edited by alexphysiker on 01-29-2010 05:30 PM
0 Kudos
Message 6 of 14
(9,561 Views)

The "my Modbus query.vi" contains the elements you need. I assume that you have downloaded the NI Modbus library and installed the version appropriate to your LabVIEW version. I'm not sure which Eurotherm manual you are refering to, but the 2000 series Modbus ... specifically talks about modbus communications on your series instrument. It is a useful Modbus/RS485 reference as well, even for those who aren't using your series of instruments.

 

The things that you have to consider are:

  • RS485 wiring     - OK since you already are communicating with other software
  • Serial port settings   - you need to determine the settings that the 2704 are using and set the visa parameters accordingly for baud, parity, etc.
  • Device address   - this will be unique for each of your controllers, the allowable numbers are 1 -247 in the modbus spec, Eurotherm 2000 series allows 1 -254. This allows your program to send commands/queries to individual instruments. Address 0 in the Modbus protocol allows a command to be sent to all devices that are on the net, with no expected response.
  • register address - the LabVIEW modbus addresses are offset by -1, i.e. for an address of 1 the address inputted to the "MB Serial Master Query.vi" would be 0.

 In the manual I mentioned they talk about how the data is returned, remembering that the data size for Modbus is 16 bits. This can represent different "types" of numbers, based on the register you are reading/writing, so you have to know and encode/decode appropriately.

 

I would also look at the Eurotherm 2404 drivers on the National Instruments site, it is in the 2000 series and apparently they all work similarly. It is using a different set of Modbus drivers that the library mentioned above, but take a look,

 

Good Luck, hope this helps.

Message Edited by LV_Pro on 01-30-2010 09:00 AM
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 7 of 14
(9,537 Views)

I assume you have read the 2704 manual, if not I strongly recommend you do this, is included in the supplied CD or search for HA026933 at http://www.eurotherm.co.uk/document-library/

It will explain:

1)      What value to change in order to set a new temperature

2)      How to set correct operating limits

3)      Give you all the information for the most common Parameters.  (manual Appendix D)

 

To set new setpoint values you need to set:

 modbus Address 2 For Loop 1, modbus Address 1026, For Loop 2, modbus Address 2050, For Loop 3

 

Use iTools to find all the modbus addresses for the parameters you need, and then use Labview.

 

Download the Eurotherm 3504 labview driver: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=2439  

There are 2 good examples. The “et3500 Process Value monitoring example.vi” demonstrates process value monitoring and if you set the correct communication parameters then you can read Loop1 PV. Match your controller communication and vi parameters and run the example.

 

Use the 2nd example to set setpoints, or simply use the “et3500 Set Setpoint Value.vi “ from the library to set new values for Loop1 Setpoint 1 or Loop1 Target SP.

 

I hope this helps.

 

Dimitris

0 Kudos
Message 8 of 14
(9,431 Views)

Hello,

 

I have a little bit the same problem but with an other eurotherm component (mini-8)

I want to set up a modbus connection directly without using iTools OPC.

 

When i use iTools OPC, it worked.

but for a test i need it with a direct modbus connection.

 

i have also the same settings as you, alexphysiker 

so i hope that you will write a nice solution when there is one or a little bit help 

0 Kudos
Message 9 of 14
(9,245 Views)

It would depend entirely on what the command set for the mini8 looks like. The paths that I and the other responder suggested were for Eurotherm controllers that shared command sets, not sure about the mini8. Basically, if it shares a command set with one of the 2000series, or any others that there is an existing driver, then that driver can be used directly, or with modification for specific differences. Did you look at the Eurotherm LabVIEW drivers on this site?

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 10 of 14
(9,240 Views)