LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with counter on DAQassist can't assign input terminal

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.....

0 Kudos
Message 1 of 5
(2,348 Views)

attached

Download All
0 Kudos
Message 2 of 5
(2,339 Views)

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?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,322 Views)

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!

0 Kudos
Message 4 of 5
(2,314 Views)

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

0 Kudos
Message 5 of 5
(2,310 Views)