using SOCKIT on port 1861
| Project: | SOCKIT - speaking and listening to TCP/IP network sockets using IGOR Pro |
| Version: | IGOR.5.00.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | awirsing |
| Status: | closed |
We are using a LeCroy oszilloscope (Waverunner 6100A) which is usally remote-controlled from LabView using the activeDSO libraries supplied by LeCroy. The connection is made over the local network on port 1861. I was wondering if it would be possible to establish a connection from Igor using the sockit xop and perhaps be able to communicate with the oszilloscope. It seems that the connection is made, but immediately terminated. I do not know much about TCP/IP connections, maybe it cannot work what I am thinking about.
The commands wich I am using are:
variable socketID
make/t bufferwave
SOCKITopenconnection socketID,"172.25.1.2",1861,bufferwave
In the history it is printed:
SOCKITmsg: Connected 172.25.1.2 as socket number 60
SOCKIT err: socket descriptor 60, disconnection???
I am using Igor Pro 6.0.4 on an Intel MacBook Pro running Mac OS 10.5.4.
Updates
| Status: | active | » fixed |
Hmm, I'm not familiar at all with the set of commands that the Waverunner will use to communicate with. However, a quick look at the remote operation manual suggests you may find some joy there.
http://www.lecroy.com/tm/library/manuals/X-Stream_Scopes/RemoteControlMa...
Some other suggestions could be to drive the oscilloscope via RS232, or GPIB if the oscillscope has a National Instruments card in it. (look at the VDT2 and NIGPIB entries in IGOR help).
| Status: | fixed | » active |
Maybe I didn't describe my problem properly, so I'll have another try:
I know about the remote control manual of LeCroy, but LeCroy seems only support either controlling the oszilloscope via GPIB or ActiveDSO ("ActiveDSO is highly suitable for fast program development in the Microsoft environment. This program is a control of ActiveX, the software technology developed by Microsoft as a subset of its COM model." remote control manual, p. 40). Since my device hasn't a GPIB interface and I want to communicate from within Igor (on a mac) with the instrument, I thought about giving the sockit xop a try. (First connect to the instrument, then sending commands and extracting the answer from the bufferwave.)
The problem is now that I seem to be able to connect to the oscilloscope on port 1861, but the connection is immediately terminated. Is this behaviour intended? And is there any chance at all to get the above described procedure to work?
That is the correct way of opening the TCP connection. The messages you see are because the oscilloscope has closed the connection. Webservers are a lot like that, once they have sent the data they close the connection.
Does the connection close immediately, or after a while? Perhaps you have to send a special message to "login".
SOCKIT waits indefinitely once a socket has been opened, only closing a socket when it thinks the other end has closed down. It detects this as it tries to read incoming packets every time IGOR calls SOCKIT in the XOP IDLE loop.
| Status: | active | » fixed |
Well, the problem was a security setting of the oszilloscope which allowed only remote access from clients with a specific IP address. (The remote control log of the oszilloscope showed all the unsuccessful attempts: "connection refused".) After adding my IP address to the range, everything works fine. That means the connection was established and not immediately terminated and could be closed with SOCKITcloseConnection(socketID).
Now I have to figure out how to write the correct commands to the instrument. That's the next problem...
Thanks for support, Andreas
| Status: | fixed | » closed |
