From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

laser scan frequency doesn't work

I used the optical spectrum analyzer (OSA) to check the result, but it didn't work. there is no output wavelength. maybe there is something wrong with the initialize and configure parts? Can anyone take a look? did I miss something? 

attached is the datasheet

 

Initialize: it is serial port. 

initialize.png

configure_SetPower: set the output power of laser

configure_SetPower.png

configure_SetGridSpacing:set the spacing between every two channels 

configure_SetGrid.png

ScanFrequency

ScanFrequency.png

0 Kudos
Message 1 of 25
(3,530 Views)

Hi cantata2014,

 

I believe the issue may be that you are trying to access the resource many different times throughout your code, but never open a session. You should open a VISA session, and use dataflow programming to make sure only one string is being written to your instrument at a time. I have attached a template for basic write functions when using VISA. Make sure you open and close the session as appropriate. This is a VI snippet, you can drop this .png into the block diagram and it will populate with the shown code, which you can use as a guide in modifying your block diagram. I hope this helps.

 

 

Best Regards,

Roel F.
Applications Engineer
National Instruments
Message 2 of 25
(3,477 Views)

Hello,

I tried to use the data flow, but it still doesn't work... the problem is I don't know where is the problem:smileysad:

1.png

 

CH. PWR. GRID: (registers are different)

2.png

 

0 Kudos
Message 3 of 25
(3,405 Views)
Duplicate: http://forums.ni.com/t5/LabVIEW/broken-wire/td-p/2986639/page/3

Please don't create multiple threads with the same question.

p.s. the need for a VISA Open hasn't been required since around the time of LabVIEW 6/6.1.
0 Kudos
Message 4 of 25
(3,395 Views)

ok I know, the other thread was a mistake.

except the VISA open, is there any other possible problem???Smiley Sad:womansad:

0 Kudos
Message 5 of 25
(3,389 Views)

You register value, is that in hex or decimal number ?

 

The format of the frame is having hex ranges.

 

If it should be in hex then you are sending  register 1Eh (30d) and not 30h.

0 Kudos
Message 6 of 25
(3,337 Views)

OK, Lets get this thread rolling along

 

cantala, I would be frustrated too but, you need to help us help you.

 

Post snippets of your code ( Menu Edit>>Create Snippet) 

 

For ALL of your block diagram constants that are integers show the radix! (Select the constant Right-click)

Capture1.PNG

 

You most likely have just found your own problem after doing that and selecting hexadecimal representation.

 

The link to the manual was a great way to start.  But, 

Capture.PNG

Any software developer that would choose that map probably has other nasty habits too Smiley Surprisedso, I susspect that devising a proper driver for that laser may hold some challenges.  Are you in contact with the manufacturer?


"Should be" isn't "Is" -Jay
Message 7 of 25
(3,308 Views)
And as noted in your other thread, you aren't even attempting to calculate and append the checksum. The protocol requires that.
0 Kudos
Message 8 of 25
(3,298 Views)

the register value 30 is decimal number.

I wrote all the numbers in decimal, then I converted the indicator to hex display. then I send the hex display to VISA write.    

you mean I should write the frame in hex? I only know to display in hex....

0 Kudos
Message 9 of 25
(3,249 Views)

configure_4.png

 

Hello, I created the snippet as you said.

the constant are all decimals I think.

but the output of the sub VIs (PWR, GRID,CH and SENA) are all hex display. 

what I don't understand is no matter it is hex display or normal display, I think they are just different ways of display, but they mean the same to VISA WRITE.   or the VISA WRITE only accept hex numbers?

 

also, I think I got some problems of initialize part, because there is no wavelength output at all........maybe what I write is right, but I didn't initialize?

0 Kudos
Message 10 of 25
(3,241 Views)