Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

To control shutter SC10

Solved!
Go to solution

Hi everyone, I am a amateur and very new to Labview driver and also the programming with drivers. But now I have to create a amplication in labview to control the Shutter SC10 of Thorlabs . I am trying to read documents about Labview but has not any effective.
Please tell me what can I do from the connection to writting that aplication!
I feel to be in despair of my capacity
Thank you very much for your help!

My e-mail: domaitrang@gmail.com

 

This Link to Shutter SC10:

http://www.mediafire.com/?ctjdc32nqpzhkbw

 

0 Kudos
Message 1 of 32
(9,028 Views)
Solution
Accepted by topic author palm-ensc

Hi,

 

According to the manual, the shutter SC10 can be controlled with an RS-232 link.

 

So the first step is to build (or buy) the cable if you don't already have it in order to connect the Shutter to the PC.

 

Then, in LV, you have to learn how to send RS-232 messages. You can do this with the VISA functions. Search for "RS-232" in LV example finder.

 

To learn how to communicate in RS-232, you can also connect 2 PCs together, send message with LV and receive them with Windows Hyperterminal.

 

Then you have to know exactly the syntax of the RS-232 messages that you have to send to the Shutter (each instrument has it's own set of "commands").

 

Finally, you will code the LV application using while/for loops, sequence structures, case structures...

 

Good luck!

Thomas B. | CLAD
National Instruments France

0 Kudos
Message 2 of 32
(8,991 Views)

Hi Thomas,

 

I use a laptop that has not COM port. Tell me, plz, how I can make a connection between two pc to send and receive messages via RS232? And where I can get the connector?

Thanks z lot for your help,

 

Trang,

0 Kudos
Message 3 of 32
(8,961 Views)

Hi,

 

You can use an RS-232/ USB convertor.

 

We sell one here.

 

The connector is a standard "DB-9" connector. You can buy them on any electronic online store (Farnell, Radiospares...).

 

Best regards,

Thomas B. | CLAD
National Instruments France

0 Kudos
Message 4 of 32
(8,957 Views)
Hi Thomas, it is exactly what I did... unfortunately it doesn't work. Hyperterminal works perfectly
0 Kudos
Message 5 of 32
(8,572 Views)

Then you probably forget to send a CR or LF code after  the command. Something that is added by hyperterminal but not by LabVIEW.

It is however easy to add by concatenating a string with CRLF.

 

If it still does not work, there is another more subtle difference and that is that hyperterminal is sending character by character, a bit slower than LabVIEW.

Normally LAbVIEW dumps the string in one big burst of characters but if you write char by char in a loop it is almost as slow as hyperterminal.

greetings from the Netherlands
0 Kudos
Message 6 of 32
(8,568 Views)
Hi and thanks a lot for your help. I have tried \n, \r, \r\n with no success... I think your advice is a very good one. Any idea on how to implement it in a visa write/read sequence? Velocity is not a problem in my application especially if faster doesn't work 🙂
Thanks again,

Danny
0 Kudos
Message 7 of 32
(8,562 Views)

Hi

Yiu said you tried \n etc.

Did you also switch the string to "\"Codes display ?

right click the control or constant to see how to select.

greetings from the Netherlands
0 Kudos
Message 8 of 32
(8,557 Views)

Hi, I discovered IMax Visa panel works when I set the 488.2 standard and use \r as end character. I am still trying to write a woking code...

thanks for your advices,

 

Dan

0 Kudos
Message 9 of 32
(8,545 Views)
ok finally it works. I used the visa configuration utility (windows start menu,Ni folder,visa subfolder). You can set the serial interface parameters there. Don't forget to increase the buffer size or it wont work.

Dan
0 Kudos
Message 10 of 32
(8,531 Views)