Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Share COM device between two instances of application running on two computers

Some years ago, I wrote a LV application which controls a given number of DUTs (not represented on the pictures) and queries the status of the climate chamber by a serial communication. The test cycle is started by the operator and the application doesn't send any command (only query of the status) to the climate chamber.

One.jpg

 

Now, in order to double the number of DUTs but without the need to buy another expensive and bulky climate chamber, we want to go to this configuration.

 

Two.jpg

The same application runs on both computers. It must be possible to use each of the two computers separately but also both at a time. 

 

Which interface or technique would you use to share the COM port of the climate chamber ? A solution requiring no (or only a minor) adaptation of the application will be preferred.

 

Many thanks in advance.

0 Kudos
Message 1 of 13
(4,541 Views)

Hi,

 

I think it depends on the protocol used. With a defined protocol like ModBus it is easy but maybe the same methods can be used with any other protocol.

What I know that will work correctly with ModBus is:

 

A Moxa device like the MB3480. It is a Ethernet to 4 COM ports.You can connect two computer through a Ethernet connection and each computer can talk to a serial port. Moxa also has 1 port devices (Brand labeled)

 

Another solution I use (with ModBus) is a multiplexer from 1 slave to 2 masters. A device from Exemys.

 

Hope this helps.

 

Kees

0 Kudos
Message 2 of 13
(4,517 Views)

Thank you for your help.

 

It is a basic serial protocol using NI VISA Serial Instr functions. The application periodically (every 15s) sends a status query to the climatic chamber. Without any mechanism to share this unique resource, conflicts will inevitably arise when the application runs on both computers.

0 Kudos
Message 3 of 13
(4,514 Views)
Here is an idea that just popped up.
 
Since the period is long (15s), no other command is sent, additional computers will never be added and both computers are connected to the same LAN, it might be enough to account for the computer clock to offset the queries :
  • A : 0s, 15s, 30s...
  • B : 7.5s, 22.5s, 37.5s...
 
What do you think about this ? I remain very interested in more secure and universal techniques.
0 Kudos
Message 4 of 13
(4,510 Views)

Hi,

 

Hmm. doesn't sound very secure to me. Clocks will drift !!

 

This device from Moxa could well work for you.

 

Another solution. Add a second serial port to one (first) computer. Connect the second computer to it.

Your application at the first computer can hold and store the request from the second computer if the first computer is communicating with the chamber. When the fist computer is ready the second computer can communicate through the first computer.

 

I would go for the Moxa

 

Kees

Message 5 of 13
(4,504 Views)

Thank you K C.

 

As said in my first post, it must be possible to use both computers alone or both together (logical OR). This eliminates your SW solution. But I will look carefully at the device from Moxa.

0 Kudos
Message 6 of 13
(4,496 Views)

You need a server!  that black box could easily run a simple exe(QMH) that receives requests for information queries the chamber and passes the data back via TCP/IP to the client.  there really is no Scaleable solution without a dedicated machine to serialize the requests on the serial bus


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 13
(4,488 Views)

I'm with Jeff on this one.  I really think you need a server application.  But to minimize changes to the existing code, you could have this server just have multiple serial ports that your test systems communicate to the server with.  Just make the server imitate the chamber on that side while periodically getting updates from the chamber.  With this setup, a minimum of 3 ports would be required.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 13
(4,485 Views)

We have done this.  The issue requires that the chamber be able to at least send some relay closures (isolated voltage changes) that the individual systems have programming that will wait until signal received.  The systems are started then the chamber.  The chamber begins then sets these auxiliary signals to inform the systems that the chamber is ready to test.  depending on how many signals you have available will determine how sophisticated your decoding can become.

0000 = Normal Operation

0001 = Temperature Transistioning

0010 = Begin Room Testing

0011 = End Room Testing

0100 = Begin Cold Testing

0101 = End Cold Testing

0110 = Begin Hot Testing

0111 = End Hot Testing

1111 = Testing Complete

 

 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 9 of 13
(4,465 Views)

Hi Minions,

 

The chamber has some outputs and they are already used to indicate some of its states (eg test is running).

However, since it is necessary to know the setpoint and the current temperature, this does not prevent interrogations by RS-232.
 
Best regards
 
@all : Thank you for your help.

 

0 Kudos
Message 10 of 13
(4,447 Views)