Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling laser using LabVIEW

Hello everyone,

I am currently running a project. In the project there is one laser module which can be controlled by the default program written in C++ that was send us in a CD when we buy the laser. Now, I would like to create an UI that will allow users to control the laser (receive data & send data for automation purposes) via LabVIEW. I know that, for this purpose I first need to build a communication bridge with laser. But unfortunately I am not able to establish a communication with the device. Honestly, I don't know where to start. I have LabVIEW experience for few years but previously I haven't written any program for a device/controller. So I can say I am having no experience on communiction staffs in LabVIEW. I made (and still doing) research in this case, but I would really appreciate your kind help.

 

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 1 of 12
(6,510 Views)

Hi Ben7878

 

You need to find the instruction manual for your laser device first and see what communications methods it accepts. TCP/IP? RS232? Etc...

0 Kudos
Message 2 of 12
(6,488 Views)

Thanks for reply. The method used is RS232.

So now what do you suggest me to do?

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 3 of 12
(6,486 Views)

By using VISA read/write vi's you can send ASCII commands to your device.

 

Have a look at this link.

 

http://www.ni.com/tutorial/2897/en/

0 Kudos
Message 4 of 12
(6,479 Views)

Do I need to use cRIO in this case? Currently I have cRIO-9035, NI 9205 and 9264 Analog I/O, NI 9375 Digital I/O and NI 9871 for serial communication. Do you think I should use these modules?

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 5 of 12
(6,475 Views)

Hi Ben,

 

It depends what you're trying to do really. What is the main objective? Do you need determinism? Signal Processing? In that case use a cRIO

 

 If you're just talking to your laser then you only NI 9871.

0 Kudos
Message 6 of 12
(6,464 Views)

Hi OA1,

The main target of me is to receive the vales and built an automated system in which values received from the laser will be reused. That is all. On the other hand, I can't use NI 9871 without cRIO am I right? 

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 7 of 12
(6,458 Views)

I think almost all cRIOs have a built in RS-232 with a db-9 port so you don't even need the 9871 module.

You don't need to mess with the cRIO to develop your communications to the laser. Just plug the laser into your computer's rs-232 port or get on of those rs-232 to usb converters. You may need a driver for the converter. Then you won't have to mess around with deploying to the cRIO as you develop.

 

I believe there is an instrument driver project template so start there. Break out the laser manual and find the commands, it should be there or in a separate programming manual. Make sure you set up your port exactly as required by the instrument (baud rate , parity, stop bits etc) . Verify that link is working by issuing some kind of status command. If the instrumentsends a termination character you can stop VISA reads on term charachters, makes things real easy.

 

Then it's a matter of implementing VIs for the commands you need and understanding how the instrument works in response to your commands. It's not the most fun work and can be frustrating at times but it's one of those tasks you will return to again and again when doing LabVIEW projects.

 

 

0 Kudos
Message 8 of 12
(6,441 Views)

Thanks MarkCG, that was a very helpful explanation. I will start developing and inform you about the updates. Thanks again.

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 9 of 12
(6,428 Views)

I did a project on data transmission using LASER in which I transmitted A string and Notes of music using LASER. If this is the same thing that you are looking for then I can help you.

0 Kudos
Message 10 of 12
(4,667 Views)