LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does Daq Stop Task VI really return to the state of the task was in before the DAQmx Start Task or DAQmx Write?

Solved!
Go to solution

Hi,

 

I am using DAQmx and DAQ Assistant and trying to get the details on the following questions.

1. Does Daq Stop Task VI really return to the state of the task was in before the DAQmx Start Task or DAQmx Write? Using Digital Input as an example, I don't think the state of the task means the input data because I tried and I did not see it really return to the input level it was.

Perhaps the more experienced folks can help share their expertise.

 

2. The info in Help states "Virtual channels created with the DAQmx Create Virtual Channel function/VI are called local virtual channels and can only be used within the task." But I don't know what "within the task" means.

 

3. Could I get some guidelines or expertises on when the experienced Labview Programmers would use the local virtual channels and when for the global ones?

Thanks!

 

 

Best regards,

 

Allen

     

0 Kudos
Message 1 of 8
(3,140 Views)

@vegeAlright wrote:

Hi,

 

I am using DAQmx and DAQ Assistant and trying to get the details on the following questions.

1. Does Daq Stop Task VI really return to the state of the task was in before the DAQmx Start Task or DAQmx Write? Using Digital Input as an example, I don't think the state of the task means the input data because I tried and I did not see it really return to the input level it was.

Perhaps the more experienced folks can help share their expertise.

 

2. The info in Help states "Virtual channels created with the DAQmx Create Virtual Channel function/VI are called local virtual channels and can only be used within the task." But I don't know what "within the task" means.

 

3. Could I get some guidelines or expertises on when the experienced Labview Programmers would use the local virtual channels and when for the global ones?

Thanks!

 

 

Best regards,

 

Allen

     


1 Yes, For a detailed explanation od DAQmx State Transitions read this

2. When you use DAQmx Create Virtual Channel.vi you pass in a Task Name and that task is the only place that knows about the newly created channel.  Unless you then pass that Task and Channel to DAQmx Save Global Channel.vi.  Save Global Channel adds the Virtual Channel to MAX as a Global Channel.

 

Advice:  I like having my Tasks deployed to MAX when all is said and done.  It gives the technician who is maintaining the system a chance to run the task and troubleshoot any strange faults like bent pins, or broken wires.  Its handy for ringing out the system wiring too!  Some assembler may have crossed up a few wires.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 8
(3,128 Views)

Jeff,

 

Thanks for helping!

 

Regarding "When you use DAQmx Create Virtual Channel.vi you pass in a Task Name and that task is the only place that knows about the newly created channel.  Unless you then pass that Task and Channel to DAQmx Save Global Channel.vi.  Save Global Channel adds the Virtual Channel to MAX as a Global Channel.", could you be more specific? For example, if Task1 (Virtual) and Task2(Global) are created, can I not use Task1 in other VI or what is the limitation? If there is no limitation, it is difficult for me to understand the difference between the two.

 

Currently I only know DAQmx Assistant clears the task automatically. Possibly keep clearing the task could reduce the application performance.

 

Allen

 

0 Kudos
Message 3 of 8
(3,115 Views)
Solution
Accepted by topic author vegeAlright

If you create a Task Channel, or scale usuing just the create vis or the assistant the io session wire is the only way to pass the info around.  It is not saved anywhere on disc.  A task channel or scale saved to a project can be used by anything in that project.  A task channel or scale saved in MAX can be used by anything on that machine.  Its a scope thing.

 

And yes, the DAQ Assistant does have extra overhead and poorer performance than the DAQmx API.  Often, this is not going to impact a small experiment.  Larger applications should avoid the express Visa.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(3,092 Views)
Solution
Accepted by topic author vegeAlright

Jeff,

 

Your expertise does help a lot. The scope stuff is not complicated, yet is broader than I thought it is.

I like your point of using the Assistant, because too much wiring sometimes makes the app uneasy to maintain.

Thanks for your times!

 

 

Allen

0 Kudos
Message 5 of 8
(3,067 Views)

@vegeAlright wrote:

Jeff,

 

Your expertise does help a lot. The scope stuff is not complicated, yet is broader than I thought it is.

I like your point of using the Assistant, because too much wiring sometimes makes the app uneasy to maintain.

Thanks for your times!

 

 

Allen


Yeah,  Painful lessons to learn!  Nice information to have!  Glad you found it useful!


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 8
(3,054 Views)

Hi Jeff,

 

With your previous instructions, I was able to use DAQmx Asssistant for DIO and AIO with my USB6001, until I am trying to use the counter and I encountered Error 50103. Please see the attached.

I am trying to use the For Loop to acquire the counts and then calculate the frequency from the common concept "counts/elapsed time". The Error came up when the program is trying to use the Assistant again. I have tried to search for an answer in the forum but other posts were more advanced than mine. I know that I can try task create/start/stop with bunch of wires as a solution, but still believe the Assistant should have had a way to work.

Would you mind helping me out again?

Thanks!

 

 

Allen

0 Kudos
Message 7 of 8
(2,907 Views)

I'm going to need more than a picture.  Likely causes are having a DIO task that uses the PFI line you want as a counter input.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(2,881 Views)