LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about global task for counter

Hi all,

  I am trying to create a global task in MAX for counter output. In the MAX, while creating the task for counter, I input the specific high time, low time and idle state. However, when I use the task as following, it ask me to import high/low time again. So if it requires those initial parameters in this way, why there is GUI in the MAX to create the rnage for the task?

 

MAXCONF.jpg

 

ex.jpg

0 Kudos
Message 1 of 11
(3,369 Views)

Hi driver,

 

as we already stated yesterday a task only define the hardware (and their settings) needed for the job. It does NOT define the actual output value!

 

In MAX you define a range. But when you use that task in LabVIEW you still want to output a value, hence that input is needed...

Best regards,
GerdW


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

@GerdW wrote:

Hi driver,

 

as we already stated yesterday a task only define the hardware (and their settings) needed for the job. It does NOT define the actual output value!

 

In MAX you define a range. But when you use that task in LabVIEW you still want to output a value, hence that input is needed...


Thanks for the reply. I understand that but just don't know why if that's the case, what's the point to provide Pulse Output Setup in MAX.

0 Kudos
Message 3 of 11
(3,326 Views)

See that big blue run button in the DAQ Wizard?  That's the only reason the Wizard needs that information.  its not a persisted property of the task.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 11
(3,320 Views)

@JÞB wrote:

See that big blue run button in the DAQ Wizard?  That's the only reason the Wizard needs that information.  its not a persisted property of the task.


Oh, I see. Thanks.

0 Kudos
Message 5 of 11
(3,309 Views)

@dragondriver wrote:

@JÞB wrote:

See that big blue run button in the DAQ Wizard?  That's the only reason the Wizard needs that information.  its not a persisted property of the task.


Oh, I see. Thanks.


Sometimes, its easy to confuse an object property with an argument for one of its methods.  In this case, we need some parameters to invoke the Run method on the DAQmx Task.


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

@JÞB wrote:

@dragondriver wrote:

@JÞB wrote:

See that big blue run button in the DAQ Wizard?  That's the only reason the Wizard needs that information.  its not a persisted property of the task.


Oh, I see. Thanks.


Sometimes, its easy to confuse an object property with an argument for one of its methods.  In this case, we need some parameters to invoke the Run method on the DAQmx Task.


Yes, it is true.

 

It is confusing me because if I input the wrong parameter like high time set to zero, I cannot save the task in MAX, that's give me a illusion that the task is bind to the parameters I set there. By thanks anyway.

0 Kudos
Message 7 of 11
(3,296 Views)

The counter high/low time should persist.  You can change any of these parameters at runtime if you want (i.e. by calling DAQmx Write), but if you just start the task without changing the parameters it should give you what you configured in MAX:

 

StartCtrTask.png

 

 

Best Regards,

John Passiak
0 Kudos
Message 8 of 11
(3,288 Views)

@John_P1 wrote:

The counter high/low time should persist.  You can change any of these parameters at runtime if you want (i.e. by calling DAQmx Write), but if you just start the task without changing the parameters it should give you what you configured in MAX:

 

StartCtrTask.png

 

 

Best Regards,



Hi John, I run the same code as your did except for my code is run in 2013 and the DAWmx Write is a polymorphic VI, will it make any difference? Anyway, I did get an error while running the code similiar to your, so it seems that the high/low time configurated in MAX doesn't not presist?

 

s.jpg

0 Kudos
Message 9 of 11
(3,277 Views)

My code doesn't have DAQmx Write at all.

 

 

Best Regards,

John Passiak
0 Kudos
Message 10 of 11
(3,265 Views)