02-21-2013 10:39 AM
Hello,
I'm running a program on LabView that generates arbitrary waveforms (one sent to channel 1 and the other to channel 2 on my AFG3102C). Those are heavy point-by-point generated pulses. They are usually over 20k points for each pulse sequence. I'm using the NI Instrument Driver for abitrary waveform generation. It takes approximately 1 to 2 seconds for the subVI to change the points to a signal, that will be sent to the AFG3K.
The core problem is, we are doing iteration that changes the pulse. So everytime we modify the pulse, the Initialize VI would shut the channels off and put it in Sinus function, then put it back to Arb, then open the channels.
I removed the Initialize VI to save some time, letting the AFG being On at all time. A new problem emerged, being the fact that while the new pulse (after an iteration) is being compiled, the AFG is still on and send a 100% duty pulse. Being connected to a laser, it makes a big flash (which is quite dangerous) and it screws the data, because our photodetector has a long relaxing time. Thus, the 100% duty pulse screws the data.
Lately, I've been trying to create 0 intensity pulses, that are put On while the AFG generates the main pulses. Those temporary pulses are put on User 3 and 4. When I start using them, I get the error 1074000000. I'm using the same protocol as with the main pulses. They are so fast to compile that I expect the AFG to not have time to send the 100% duty pulse.
So, if anyone can help me out by :
-Giving me a way to put the Channels OFF while it is building the next pulses
-Giving me a way to force the AFG to NOT give a 100% duty pulse while it is building the next pulses
-Telling me how to send those temporary pulses without getting the error.
-Anything else that could help me out.
Thanks!
Sorry if it is not clear, I'm not quite good in English. Ask me questions and I'll try to sort it out for you. I put the image of the SendPulse VI I'm using in the end.
02-22-2013 04:49 PM
Hello Vissen,
Sounds like quite the project!! I took a look at the picture of code you are using. It looks like you are starting from one of the examples for the driver. However, the changes that you made are not suggested for this type of functionality. I would suggest your code to look somewhat like this:
Initialize
Configure Arbitrary Waveform
Enable Output: True
Enable Output: False
Clear Arbitrary Waveform
Configure Arbitrary Waveform
Enable Output: True
Enable Output: False
Clear Arbitrary Waveform
Configure Arbitrary Waveform
Enable Output: True
Enable Output: False
Clear Arbitrary Waveform
Close
The point being, only initialize and close the device once for the code and be sure to configure, enable, disable, and clear each waveform before configuring a new waveform. I think this should resolve some of the issues that you are seeing.