LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert RS232 serial link controlling Marconi signal generator 2024 to control via the LAN?

Have looked at TCP Server/Client but seems excessive for the task?
Are there any recommendations to acheive this in a Master/Slave PC configuration?

0 Kudos
Message 1 of 8
(3,573 Views)
What are you using for the RS232 communication. If you have gotten or written a driver using VISA, then the existing driver should work with little changes. One of the big advantages of using VISA is that a single driver can be used for serial, GPIB, USB, PXI, and ethernet instruments. In MAX, you go to Devices and Interfaces, right click and select Create New. Then you can select VISA TCP/IP Resource.
0 Kudos
Message 2 of 8
(3,573 Views)
Many thanks Dennis, will look into that.
The link does currently use a VISA with the COM1 and data commands/measurements  combined so will look at the TCP/IP resource.
Having configured it already for the manipulation of the character string, does the TCP/IP resource just encapsulate the data string or will it require any additional configuration?
0 Kudos
Message 3 of 8
(3,563 Views)
VISA will take care of everything for you. You might want to look at the Instrument Driver Network and search for instruments with Ethernet interfaces and other Marconi drivers. An Ethernet driver will in most cases, be identical to a GPIB driver. Serial instruments are usually a little different in that they often require a termination character (CR, LF, CR/LF) at the end of each command. If your serial code already uses this, you instrument may just ignore it
0 Kudos
Message 4 of 8
(3,558 Views)

Thanks for advice on the VISA TCP/IP resource, have attempted to use it as the front end between the host computers over the LAN.

The original connection was a fibre serial link as mentioned before and the commands for the Sig Gene were  connected via a RS232.vi with COM1 as the VISA resource. Now the VISA resource connection of that RS232.vi is connected to the new TCP/IP VISA but with no results. Are there any other considerations that should be taken into account or is the RS232.vi no longer valid (sounds obvious!) ?

 

0 Kudos
Message 5 of 8
(3,545 Views)
You've added the TCP/IP resource in MAX? There are actually two types of TCP/IP connections possible. I've only used a VXI-11 type instrument (it actually has nothing to do with the VXI bus) but there's also a raw socket connection. You might have to check with Marconi on the type. After that, you should be able to ping the instrument and during the definition of the VISA resource, there's a test button to verify the connection. I used a dedicated local subnet which made things a bit easier. After that, my guess is that the same commands you used for RS-232 should still be the same. My only real experience has been going from a GPIB connection to an Ethernet connection and most instrument manufacturers don't have separate programming commands for different connections. If you want, post your modified RS232 program so someone can look at it.
0 Kudos
Message 6 of 8
(3,542 Views)
Forgot to add that the new modification to the control link is that the 232 link that was connecting the computers is replaced by ethernet but  the link to the  Sig Generators is GPIB so effectively a GPIB/ Interface required.
0 Kudos
Message 7 of 8
(3,540 Views)
Now I'm a bit confused. I thought you were controlling an instrument connected from a pc through a serial cable. What you were actually doing was communicating over a serial cable to another computer that had a GPIB connection to the instrument? If that's true, then the serial VI was communicating to another VI on the other computer? If that's the case, then yes, your RS-232 program would need to be modified quite a bit and you probably want to look at some of the TCP/IP client/server examples that ship with LabVIEW. Another way, but one that I don't have a lot of experience with, is to use Remote NI-VISA. With this, an instrument connected on one computer, can be shared with other computers on the network. There's an application not on that here. Once configured, on the client pc, you open a VISA reference with the syntax visa://machinex/GPIB0::n::INSTR where machinex is the name of the server or it's ip address.
0 Kudos
Message 8 of 8
(3,536 Views)