LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to manage multiple controllers (Eurotherm 3508) on single serial port?

Solved!
Go to solution

Hi everyone,

 

I have two Eurotherm 3508 controllers that are connected to my PC on a single serial port, so they both have the VISA resource of "COM4." Further, one 3508 is in single channel mode, and the other 3508 is in dual channel mode, so I would like to have 3 separate instances essentially. I have no trouble seeing both controllers in iTools, and can change all the parameters through this software, but I would like to make a more simple interface in LabVIEW to only control the set temperature of each of the 3 channels, especially for other users of this instrument. 

 

Also, the computer that is used for these controllers does not have a LabVIEW license, so I am making the vi on my office computer, building an executable, and sending the .exe to that PC. I am already using a different LabVIEW .exe I made for another instrument on a different serial port on this PC, so this is not an issue at least.

 

I have been trying to use the Eurotherm 35xx drivers, but I've realized I can't simply have them as the same VISA resource and change the unit address (which I have set for each device channel in iTools), as my testing on this just leads to a "-1073807246" error in the VISA Open vi. Even the simple Temperature Control Monitoring example vi in the 35xx library does not work. This led me down a rabbit hole of trying to use DataSocket with an ocp URL for each device (such as in this post), but I was quickly out of my depth and could not figure out how to use this method either. 

 

Any help on this would be greatly appreciated! I am happy to provide any additional information needed, but I figure I don't need to include my vi, as the same issue occurs for the example vi in the 35xx library. Thanks!

0 Kudos
Message 1 of 4
(290 Views)

-1073807246 usually means that something else has reserved the serial port.

 

Most likely, there's either some other software using that serial port, or you're using a serial adapter that has problems with its driver not releasing control of a port after it's done being used somewhere.

 

I would make sure that you don't have the manufacturer's software open when you run it nor running any test panels in NI-MAX.

 

Also try a full reboot and see if it either works or gives a different error if the software is the absolute first thing you run.

0 Kudos
Message 2 of 4
(267 Views)

If you have one serial port, you have to treat it as such by using one VISA resource. How did you connect the multiple Eurotherm controllers? Did you use a RS-232 to RS-485 converter to connect them on a 485 bus? Or are you using an RS-485 interface directly?

The devices do not allow RS-232 connection directly if you want to connect more than one device to the same interface.

 

The communication protocol is normally Modbus based. Part of the Modbus operation is also a device ID (unit address). When communication with a specific device instance you also have to specify this device ID.

 

Since you only have one single interface port, you also should open that only once and then specify the device ID with each operation you want to do (Read current value, Write Setpoint, etc). If the Eurotherm VIs don't support that, but instead require you do specify de device ID at the time when opening the port, you have a problem. Such a driver is NOT written to support multiple device instances as it logically ties the device instance directly to the communication interface. Note: I'm not sure this is the case. You don't show any code nor any image of your code and I don't intend to download the Eurotherm driver and install it on my system just to check this.

 

Possible solutions:

Instead of using the Eurotherm Library you could use one of the available Modbus libraries. The disadvantage of this is that you do not have ready made functions to read the current temperature value etc. Instead you need to consult the Eurotherm documentation to find out which Modbus address corresponds to which value and then use the according Modbus function to read or write that address.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 4
(247 Views)
Solution

Ok, I have solved the issues, and I will describe here in case anyone else in the future is in the same predicament as I was. 

Kyle was correct that error "-1073807246" was caused by having iTools open alongside LabVIEW, so this was fixed by not having iTools open simultaneously.

 

As for managing multiple controllers with the 35xx drivers, the unit addresses should be 1 and 2 by default on a common serial port, i.e. the same VISA resource with different unit addresses. 

 

Finally, regarding the dual channel mode, this can be solved by editing the individual vi's of the 35xx drivers, as they are only set up for single channel mode. For example, below is the default vi for setting the setpoint:

Loop1.PNG

 

Here, these registers are all for Loop 1 (the addresses can all be seen in iTools). To make the vi valid for Loop 2, the registers must be changed to the corresponding addresses for Loop 2, which again can be seen in iTools, like so:

Loop2.PNG

In this example, 24 is the address for Setpoint 1 of Loop 1, so this was changed to 1048, which is the address of Setpoint 1 of Loop 2. Then, this is simply repeated for any parameter that is required.

0 Kudos
Message 4 of 4
(205 Views)