LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My button cursor is not working and function

Hello hi..i have one question, i have design the cursor on my circuit on block diagram...the problem is the cursor is not function and all button at my front panel is not working when run the circuit...why? anyone can  tell me how to solve this problem or....have any toturial/ example that can i refer.. now i have include my drawing  vi.

I hope someone can help me..thank you...Smiley Very Happy

0 Kudos
Message 1 of 5
(2,766 Views)
  • With each iteration of the while loop you are generating 3 events (via "valSgnl"), but can only consume one event, so you are creating a huge queue buildup. The events created by your button presses will never get a chance to execute. Delete all these val(sgnl) property nodes and whatever is connected to them. They make no sense at all.
  • The cursor cluster probably needs to be wired across all event cases
  • What's that convoluted code with the "fist run" user event? Makes no sense!
  • ...
Message 2 of 5
(2,752 Views)
  • Remove the time out event or set it to -1
  • The following code you have implemented in order to compute the number of values to read will most probable return invalid values (note, the array has only a single element included!)
    Invalid Code Section.PNG
    The code has redundancy in the "Time Base" Value Change event and your "First Run User Event".
  • Your sample clock setting obviously makes no sense:
    What the heck.PNG
  • Most important: Do not use two potential "blocking" calls in a single loop. You are using DAQmx Read (given number of samples) and an Event Structure within your loop. You will run into issues because of this!

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 5
(2,744 Views)

thanks about your advice....so one more thing....that have alternative way to replace time base.......because..i want design oscilloscope...Smiley Wink

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

So you want to have the ability to change the sampling rate during acquisition?

What kind of hardware do you use?

 

Depending on the hardware: Changing the sample rate during acquisition is most probable not possible. So you either have to stop, reconfigure and start the acquisition or you have to create an "external" clock using a counter.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 5
(2,719 Views)