02-12-2013 09:41 AM
Hi LabView Gurus!!!
I have a question to you. I want to make some program to control this spectrometer with LabView program through computer. I got manual (it was not to easy to find it) and got all the comands to control it. everything is fine but when I set the wavelength which I want to move it moves fine but I can't see it in computer that it moves. I can see fine in spectrometer that it moves.It only shows me at the end of my programm that it moved to the specific wavelength (it said me ok at the end means it moved it) that I wanted. But I want to see it in computer also as it moves it. As you can see I put some while loop to show me wavelength all the time as it moves it but its not even entering to this loop. It waits until it reaches the final wavelength and as it enters to the loop. How can I force it to enter into this loop and show me the running wavelengths? In order to understand what I mean please look at the attached program.
Thank you.
02-12-2013 11:12 AM
Most instruments require a querry command before sending data back. Are you not sending a querry command?
02-12-2013 11:18 AM
Actually, that whole loop and the surrounding code does not make any sense. You are waiting for a service request and that is a function of GPIB instruments. You just can't make these things up. Then, you are taking the string length of the VISA Resource Name and if not 0, terminating the loop. Why? I don't understand your reasoning.
02-12-2013 11:39 AM
Thank you for reply.
I dont really understand how to do this.every time as it moves forward in wavelength I want to read it from buffer. to see in computer what I see on display of spectrometer. I dont understand how to do this. all I see is only the final wavelength.
02-12-2013 11:43 AM - edited 02-12-2013 11:46 AM
thank you for reply.
I know that something wrong with that loop. I wanted that it will enter to the loop and will read the buffer, i.e the running wavelengths but nothing happens. its even doesnt enter the loop and only at the end of the command when it approaches the final wavelength. the reason of the loop I thought to read the wavelengths from the buffer and when it gets the final wavelength to stop to read.. that's how I wanted to get my aim: see the running wavelengths during the scan.
that's why I'm asking for your help. maybe its impossible to do such a task?
02-12-2013 11:55 AM
It is in fact entering the loop. It is just immediately exiting.
Do you even know if the instrument is supposed to be transmitting these intermediate steps that you see on the display? You just can't assume that. Perhaps all you can get is the response when it is complete, like you are already getting.
02-12-2013 12:08 PM - edited 02-12-2013 12:11 PM
thank you for your reply.
that's what I've seen.. it waits till the end of the scan and then enters the loop. perhaps you're right..all I can get is only response when it ends the scan. I'll write them a letter with that question.