11-29-2018 04:40 AM
LabVIEW Noob here. I'm using LabVIEW 2017 with a USB-6211, I have a working program which I wrote using a couple of DAQ assists to output voltage to a motor. I'm trying to add in the ability to measure RPM from an opto wheel using the counter function of another DAQassist. I have an existing sub-VI which supposedly detects the connected port (DEV#) and I understand I should wire this to the 'device name' terminal.
The DAQassist for the counter contains a field called 'input terminal' which contains a DEV# which is wrong, and causes the program to throw an error when run.
Hope this makes sense? Posting block diagram screenshot shortly.....
11-29-2018 04:55 AM
attached
11-29-2018
07:00 AM
- last edited on
12-17-2024
11:45 AM
by
Content Cleaner
Hi Sim,
The DAQassist for the counter contains a field called 'input terminal' which contains a DEV# which is wrong,
An "input terminal" is something different than a "device"! You need to select your input pin (aka terminal) here…
Why do you use DAQAssistent at all? Why not use simple DAQmx functions?
11-29-2018 08:37 AM
Thanks for the reply.
That field is auto filled with /DEV#/PFI1, (where # is the port number the device is connected to) when I create the DAQassistant. Program works fine, until PC is powered off or USB device reconnected, then throws an error. If I manually populate the field, changing # to the new port number it throws an error. Leaving the field blank or just entering PFI1 also throws an error.
I use DAQassist because I don't know any better. I am aware that I should create the code from scratch, but I haven't had time to do all the tutorials yet. It started out with me just wanting to read a voltage on the screen, for which the assistan is very quick and easy, and has now grown into something more!
11-29-2018 09:03 AM
I've got a 6212 sitting here right beside me. I refuse to look at pictures of code -- I'm willing to help, but you need to help me by posting your code. This will allow me to see how the DDA (Dreaded DAQ Assistant) has decided for itself what you want to do. Note that the DDA is there to give you the False Impression that DAQmx is difficult, and you need to be led by the hand to do simple things. This works, but also means that when you want to do something a little less simple, you get someone saying "Go search the Web for 'Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications' ". But you didn't hear that from me ...
Did I say "Post your code"? Be sure to describe exactly what you want to do (in words -- don't try to describe it in DAQmx terms).
Bob Schor