NI Home > Community > NI Discussion Forums

Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Falcondiaz
Posts: 13
0 Kudos

How to use "Next" button to control prgram steps?

Hi all,

 

I'm a beginner in Labview programming and I need some help on creating this interface control.

 

Attached is the program and a jpeg of the frontpanel.

 

I would like to use the "next" button to control the next sequence of entring the parameters(ie fm/am, Mhz,dBm etc.) and aquisition of SINAD.

This means that only when the user presses "next" then the next frequency parameters will be entered and SINAD measured.

 

I hope someone out there understands what I mean and would be able to help me on this. I cant seem to get the attachments to work together with this post.

Knight of NI
Posts: 18,064
0 Kudos

Re: How to use "Next" button to control prgram steps?

Please, please, please read this: Application Design Patterns: State Machines

 

and stop relying on sequence structures so much.

Member
Falcondiaz
Posts: 13
0 Kudos

Re: How to use "Next" button to control program steps?

Thanks for the quick response, but I need each frequency with its other settings to flow in a specific order with just the "next" button to control when the user wants to change to the next frequency step. Is state machine still able to achieve these results?

 

I know my program is too simple thats because i'm really a beginner who just started learning labview using a guidebook.

 

Really appreciate all your help!

Member
Falcondiaz
Posts: 13
0 Kudos

Re: How to use "Next" button to control prgram steps?

Hi, I manage to utilise the use of state machines already, however, it does not solve my problem of using one same "next" button to switch to the next state. I tried using local varables but it is not allowed in the event structure, are there any other alternatives?

Knight of NI
Posts: 18,064
0 Kudos

Re: How to use "Next" button to control prgram steps?

You must not have implemented it correctly. Please post your latest code.