LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

catch com port message - translate - send translated message out.

Hello,

 

We are goign to replace every old PSU's by agilent PSU's.

The problem is that the software has to be rewritten so that the command's will be known by the agilent.

 

My idea was to catch the message that has to go to the hameg, translate this message, send message to agilent.

 

This all could be done by using hardware serial ports, connect out(COM1) to in(COM2), translate and send to the agilent PSU.

But I think this could be done without the software, I don't know how to do this in labview...

 

Who can help me here.

 

gr,

Bart

0 Kudos
Message 1 of 3
(2,233 Views)

Why not just change the old software to use the Agilent commands?  Adding an extra layer for translations is just asking for trouble.

 

Assuming everything is using RS-232, you could do this with 2 ports (one from the tester and another for the agilent power supply) FOR EACH PSU.  I recommend using a loop that will do nothing but read data from the port.  Hopefully the commands are using the termination character to make things a little easier.  You then have to figure out which command was sent.  The Search/Split String might be useful here.  Once you figure out the command that was sent and its parameters, you have to rebuild the command and output the data to the second port.

 

You will have to do something similar for all of the responses from the PSU.

 

Again, I recommend just changing the original code.  It will be a lot less work.


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 2 of 3
(2,224 Views)

Hi Crossrulz,

 

I also described the the methode you mentioned by using 2 com ports.

The reason I wanted to see if I could emulate a serial port was because I then only have to do this once and I would need no extra hardware.

There are about 100+ tests that have to change so before changing them all it would be much cheaper to make 1 solution for all.

 

I was also think about a controller which does the translating, cost hardware but I think it's relative cheap.

 

How the translation programmatically works is no problem for me.

0 Kudos
Message 3 of 3
(2,217 Views)