05-02-2008 04:13 PM
05-02-2008 04:45 PM
05-02-2008 05:16 PM
Hi,
Yes I know the code in bits looks a bit strange, but there are massive issues with this instrument (which in my case was purchased in the 1980's) and getting data over GPIB into labview. There is code posted on the NI website, but it doesn't work, as it fills up the buffers and is not able to re-set them so you just get a "buffer overload" message. Working through all of the posts regarding problems controlling an SR400 in labview, and examples posted I managed to get that working code, which does read realtime values, but only using the older GPIB functions (I don't really know much about any of this, so pretty much did what I was told by other users!). I'm not sure about the waits, I know that without them my data doesn't get written into labview at the right time, I think they are just 10ms waits before labview reads from the SR400, possibly due to how old and slow the counter is?
I have arranged the code into frames side by side so i can try to understand and follow what is what as I've never done any programming before. I understand that I should put a loop in the 6th frame I think? I really keep doing something wrong trying to do this. I can just about handle the wiring things together, but loops get me lost! I am not trying to run in a continuous way, just do say 10-50 periods at a time.
Thanks