09-13-2018 03:09 PM
Still working through how to use Ni-Scope with our new USB-5132
I have a VI that seems to be working but only works once. That is the very first sweep is displayed on the waveform display but it is never updated. Watching my code execute it looks like it should be updating the screen every time the loop runs, but it doesn't. Nothing fancy going on here I am just looking at a 60hz sine wave. I can pull either probe off the circuit and the waveform display never changes from the very first sweep.
09-13-2018 03:23 PM
Did you try auto trigger?
mcduff
09-13-2018 03:24 PM
PS I would refactor your program to a State Machine that includes an event structure, like the JKI State Machine.
09-13-2018 05:05 PM - edited 09-13-2018 05:24 PM
Auto trigger makes no difference.
Also I use state machines all the time but I never could figure out how to use the JKI state machine. This is probably the third time I even used an event structure since its inception. if it's not too obvious already I don't really understand how to use them.
09-13-2018 05:29 PM
Give me a few minutes to get to my PC and I'll take a look.
Sometimes even real experts need to see the code.
09-13-2018 05:33 PM
I have not used NI-Scope much at all, so these are suggestions:
I'll let the expert, Sir Jeff, figure out the remedy.
mcduff
PS Event structures are extremely powerful. I highly suggest learning them.
09-13-2018 06:01 PM
See comments in code:
Fetching does not Initiate an acquisition that was your primary issue.
I addressed some other things as well
For a Developer that never used NI SCOPE before and is new to events- I'ld give it a solid C+ with a suitable boost for asking the right questions here!
09-13-2018 06:50 PM
Here is a great link for User Events, which can be combined with normal events.
https://github.com/JackDunaway/LabVIEW-User-Events-Tips-Tricks-and-Sundry
Not to hijack the thread, but the examples are tremendous.
09-13-2018 07:16 PM
@mcduff wrote:
Here is a great link for User Events, which can be combined with normal events.
https://github.com/JackDunaway/LabVIEW-User-Events-Tips-Tricks-and-Sundry
Not to hijack the thread, but the examples are tremendous.
You should try working on s project he had a hand in architecting...nice job if you can get it.
09-13-2018 10:39 PM
@JÞB wrote:
See comments in code:
Fetching does not Initiate an acquisition that was your primary issue.
I addressed some other things as well
- Timeout case was queueing up every 1mSec there was no user activity (Regardless of acquisition length) that was bad...
- Dup Code in unnecessary initialization case and config value change case (Fixed by using a singleton timeout as an event in the configure case)
- Exit latching boolean would never unlatch (See Comment in exit case)
For a Developer that never used NI SCOPE before and is new to events- I'ld give it a solid C+ with a suitable boost for asking the right questions here!
I can't look at your code at home as I only have the Home Edition (2014) here. But I think I know what you are saying. As I said I never really understood event cases. Anyway what I am after here is basically making an oscilloscope. The end user needs the ability to analyze the waveform by "tweaking knobs" the same way they normally would with an oscilloscope. I know duplicate code with the first call was wrong. I originally started with a producer/consumer to with a event structure in the producer to handle the scope controls. (QMH?) But had trouble with the initializing the instrument before the producer started acquisition, and the first call thing was a band-aid that I carried over this morning .
As for NI-Scope, It should not even be called that. I know how to operate an oscilloscope, I have been automating oscilloscopes or years. But I have never had to set the time base on any oscilloscope by calculating the right sample rate and number of records I need to acquire to see 5 cycles of any given frequency.