Communiction with thorlab Filter wheel FW102

VISA; TCP/IP, CAN and similar protocols
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

Hello everyone,

First of all i would like to thank Mr eg for his nice vi that i am using now to communicate with this Filter wheel.. (http://www.labviewportal.org/viewtopic.php?f=18&t=472)

Thorlab provided me with all the files Initialize, read, write, and close the filter but i don't know how to integrate them with the eg vi file. Please find attached all the vi files attached working with LanView 7.1

There is a file call FW102sample.vi, which contain all the Initialize, read, write, and close together, if any one can integrate it within eg vi file that will solve my problem.

Thank you in advance,
Вложения
SerialNET_7.1.zip
All the files
(268.08 КБ) 434 скачивания
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

Hi!

If I understand you right, you want to replace the FW102x.dll with .NET :vi: s for serial communication? The problem here is, that you need the data communication protocoll to do this. In the dll are two levels of communication implemented, but .NET :vi: implements only the low level of communication.
So you will need the full documentation, where communication strings for your kind of devices are describen.

regards, eg

P.S. with .NET :vi: is possible to Open, Close, Send anything and Receive anything over serial interface, but you have to know what to send and how to interpret received data.
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

Thank eg for your hlep.

What i am lookin for is, I would like to use your vi (.NET VI), and make the fillter change it position for example from position 1 to posion 2.
the picture and all the information and commands of the fillter is attached.

Regards,

Mkman
Вложения
FW102_USER_MANULE.pdf
(1.28 МБ) 376 скачиваний
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

Ok, it seems to be possible, but you have to do it yourself, because it's easy :D
You need to open COM, than write the position using "pos=(n)" and read the actual position using "pos?" and than close COM.
Вложения
Commands.png
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

looooool :)

I really love to do it by my self but I don't know from where I should start !!!!!!
In same time I am a beginner with labview :) I am trying to learn how to use this prgram :)

Using your VI, i change the COM6 to COM4 which i am using and the baud rate 115000, then I click run .. everything goes ok ok ok ok, but within the while loop i should write the position using "pos=(n)" and read the actual position using "pos?" and than close COM :)
I don't know how to do this step :) ( write the position using "pos=(n)") write it where :) and how .. I am really dump !!!

Just tell me what i should do and i will do it by my self .. I really would like to know how to do this ..

Thank you in advance,
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

In the SerialNET.vi you uploaded, what happens if you write and send following?
Вложения
Position.png
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

in read line shows

pos=5
pos?

which same as the string
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

You have not to forget to add a new line after "pos?". It should be 3 lines. Than if you shold get the current position from your device. Does it move? Which positions are common for your device? Try to replace 5 with an another number.
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

It working fine with its own software but i am trying to integrate it with labview.

I tried another position and all the command but no respond all the data when it inter the while loop it is stock in it and the while loop keep running .

I think the device should be Initialize first and then read, write, and close. there are Initialize.vi, read.vi, write.vi, and close.vi within the FW102x.lbb which included in the zip file attached in the first post.

I don't know how to initialize the device !!

Regards
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

I think the initialisation is the opening COM, not more.

Here is my next suggestion:
right klick on the string control and select "/ Codes Display", than input the string as shown on the screenshot.
Вложения
CR.png
CR.png (12.08 КБ) 15897 просмотров
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

this is what i got

pos=5
Command error CMD_NOT_DEFINED
>
pos?
Command error CMD_NOT_DEFINED
>
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

Ok, any answer is better than no answer :wink:

Try first to reset the power on your device, than remove \n from the string and try it again.
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

wooooooooooooooooooow it works
thank you eg

i used the command

pos=3\rpos?\r

and i got the result

pos=3
> pos?
3
>

and the fillter is changed to postion 3 ,, cooooooooooool I will get some sleep and i will see the next step :)

thank you eg again .. i will see if i can do it then i may seek ur help

Regards
Mkman
beginner
beginner
Сообщения: 23
Зарегистрирован: 29 апр 2010, 13:33
Версия LabVIEW: 7.1
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Mkman »

This is what i have done so far, I didn't test it :D :D yet but i think it will work fine .. :dance: :dance: :dance:

I have uploaded it for anyone else would like to automate his Filter wheel :1stplace:

I have designed it to change the filter at specific energy values, what do you think eg about my work :think: :think:

Mkman
Вложения
fw102.jpg
FW102_SerialNET_communction.vi
(48.6 КБ) 340 скачиваний
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Communiction with thorlab Filter wheel FW102

Сообщение Eugen Graf »

Hi!
I don*t understand your block diagramm (but if it work for you :super: ) and I think you have to learn :labview: . I would prefer you make four :vi: s, Open, Set Filter Value , Get Filter Value and Close. You will need to learn how to make needed string from a numeric value using Format String and how to extract a number from a string using Scan From String.
Of course you have to learn ho to make SubVIs and Inputs/Outputs of them.

eg

P.S.now I have to sleep, will have an important conference with a customer tomorrow...
Ответить

Вернуться в «Communcation with devices»