Notifications
Clear all

Using PYTHON to Interface the SPECTRAN HF-60100 V4 X

4 Posts
3 Users
0 Likes
9,592 Views
(@coolrunnerii)
New Member
Joined: 12 years ago
Posts: 1
Topic starter  

Hi

We are considering to buy one of these, but to interface it from our production test system we need to get data from it into our PYTHON test sctipts.

Is this possible with the current SDK?
Are you working on such a solution?

Tor Berg


   
Quote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

All available development interfaces (Programmers Guide and ASDK preview) are written for C++. It should be possible to write a python binding to wrap those APIs, but I've no idea how much effort would be required for that considering that they involve quite a bit of threading and platform stuff (Win32 for the PG, Qt for the ASDK preview).

There are other options that could work for you:
1) Use the "spectran" command line tool included in the MCS package as a low level interface to a Spectran device (this is however only intended for testing purposes and not supported in a production environment)
2) Operate the device in remote mode using the "Spectran Network Server" (also included in the MCS package) to create a TCP wrapper for the USB connection and use the USB API documentation to communicate with the device
3) [Completely untested] Create a FIFO on your system and use the MCS to record device data into that FIFO, then read the data from your script. This is just somethin I've thought of right now, so I've no idea if this would work at all.

We might add a real network API in the future, so you could interface with the device in almost any language, but there is currently no work being done on that front.


   
ReplyQuote
(@nricklin)
New Member
Joined: 12 years ago
Posts: 1
 

I am interested in option 2, but perhaps with php instead of python.

I've played with sending and receiving packets to and from the spectran network server, but so far I don't know what the packets should look like. Do you have any documentation or working code that I can learn from?


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

The Spectran Network server is just a thin TCP wrapper around the binary Spectran USB protocol that is documented in the programmers guide.


   
ReplyQuote
Share: