Jump to content

An overwhelmed newbie's VI doesn't work


Recommended Posts

Hello,

I am a grad student who is essentially LabView illiterate. I've spent awhile trying to pick up what I need from the example VIs and tutorials, but I simply do not have the experience in the program yet to competently setup a VI that I need to get working. Here is, briefly, what I am intending to do:

1) I've taken three outputs from a very old instrument and checked that they are functioning properly and in the proper voltage ranges. One is a trigger to begin data acquisition, one is a pulse train (that I need to count), the other is an analog voltage (that I need to continuously sample while counting).

(a) I am using a NI USB-6009 DAQ to measure the analog voltage and I have also put the trigger in here.

(b) I have an Agilent 53131A counter hooked up to the computer via a GPIB:USB interface. The computer reads this just like a GPIB interface. This instrument is complete overkill for what I need it to do, but it's what I have to work with! With an auto trigger gate, the instrument counts just fine.

2) I have installed the relevant drivers for both instruments. The Agilent device has been successfully configured to send information via NI 488.2 standard.

3) I have built a simple VI to take measurements. It does not work. Here is how I set it up: copied+pasted from the agilent VI example the function/arm totalize/stop totalize/initiate blocks. These take the user inputs for the GPIB address, what to do (totalize means count), and when to stop. This is passed to a read measurement within a while loop instructing it to continue until a certain count is reached. Also in the loop is a DAQ assistant function setup to measure the voltage triggered by the trigger channel on the NI DAQ. I've attached the VI and two images.

Here are my problems:

1) The counter does not send the info to the VI. It has, on occassion, counted through two counts and stopped. I have no idea what caused it to work those times. The count is usually stuck at zero. I realize that not everything is in the while loop, but when I have any of the other agilent blocks in the while loop the VI crashes. It doesn't seem logical to me that the blocks would function outside the while loop though!

2) The trigger does not always start the analog voltage DAQ even though it is triggering (as seen on a voltmeter).

If anyone can be of any assistance, I would be VERY grateful!

Best regards,

--Dave

Link to comment

Hi Dave,

Oops, didn't see your code at first. Have to get back to you after looking at it.

Just quickly checking your code; (Ran out of surfing time this morning)

You have DAQ Assistant setup to take 3000 samples at 10Hz. Is this really what you want?

It means it's going to take 300 seconds for that block to execute and spit out a result; tying up everything else in that loop while it's doing it.

Link to comment

QUOTE (pallen @ Jul 21 2008, 10:55 AM)

Hi Dave,

Oops, didn't see your code at first. Have to get back to you after looking at it.

Just quickly checking your code; (Ran out of surfing time this morning)

You have DAQ Assistant setup to take 3000 samples at 10Hz. Is this really what you want?

It means it's going to take 300 seconds for that block to execute and spit out a result; tying up everything else in that loop while it's doing it.

thanks for your swift response pallen! indeed, i had been playing with this a few times and forgot to change this before uploading it. i normally set the buffer to 1, so that it outputs a value 10 times per second. this seems to function OK. i was playing with things to see if i could "batch" the data instead of feeding things real-time and didn't change that setting back. i will double check everything else to be sure there aren't any other unreverted changes.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.