Jump to content

State Diagram Toolkit Question


Recommended Posts

This is probably an easy one. But I'm not sure if I'm missing something. :(

One of the tools our company purchased recently was the State Diagram Toolkit. For the type of programing we've been doing, this a nice, simple tool that I've found very useful.

On most of my applications, I end up adding a "Wait" or "Wait Until Next Multiple" in my main loop. Usually just 10ms or so.

I'm doing this with the intention of freeing up a little CPU time when operations aren't time critical. But being fairly new to the whole LabView environment, I'm concerned I may be committing a faux pas or be guilty of employing bad technique. (No point in developing bad habits if I can avoid it)

There are some "States" in my current project where I'd like the code to process as quickly as possible. (Re-sizing and saving images) But I notice poor front panel performance (lagging mouse and keyboard etc.) when there is no "Wait" function in my main loop.

My question is; Am I asking for trouble by doing this? Is there a better way?

Thanks.

Link to comment
This is probably an easy one.  But I'm not sure if I'm missing something.  :(

One of the tools our company purchased recently was the State Diagram Toolkit.  For the type of programing we've been doing, this a nice, simple tool that I've found very useful.

On most of my applications, I end up adding a "Wait" or "Wait Until Next Multiple" in my main loop.  Usually just 10ms or so. 

I'm doing this with the intention of freeing up a little CPU time when operations aren't time critical.  But being fairly new to the whole LabView environment, I'm concerned I may be committing a faux pas or be guilty of employing bad technique.  (No point in developing bad habits if I can avoid it)

There are some "States" in my current project where I'd like the code to process as quickly as possible.  (Re-sizing and saving images)  But I notice poor front panel performance (lagging mouse and keyboard etc.) when there is no "Wait" function in my main loop.

My question is; Am I asking for trouble by doing this?  Is there a better way?

Thanks.

6009[/snapback]

The wait function will normally happen in parallel with the rest of the code, so if you have something that takes more than the 10ms, there won't be a problem, and if it takes less than 10ms, it'll free up some time for the rest of the system to do its thing. Putting a wait in the main loop is generally a good idea.

Link to comment
There are some "States" in my current project where I'd like the code to process as quickly as possible.  (Re-sizing and saving images)  But I notice poor front panel performance (lagging mouse and keyboard etc.) when there is no "Wait" function in my main loop.

My question is; Am I asking for trouble by doing this?  Is there a better way?

Thanks.

6009[/snapback]

One of the things I do when I want certain cases to run as fast as possible is put the input to the Wait primitive inside a case structure and send a 0 to the input base on the incoming state.

post-584-1126030478.png?width=400

Link to comment
There are some "States" in my current project where I'd like the code to process as quickly as possible.  (Re-sizing and saving images)  But I notice poor front panel performance (lagging mouse and keyboard etc.) when there is no "Wait" function in my main loop.

My question is; Am I asking for trouble by doing this?  Is there a better way?

Thanks.

6009[/snapback]

My customer's look at me strange when I tell them: "I improved the performance of the software by adding a delay". This technique is perfectly fine.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.