Jump to content

event and array


Recommended Posts

hi @ all,

3 problems: 1st - is it possible to have an event in an event structure coz my VI acting very slow - see freezes - if I do it.

2nd - If I can't use the event function how am I able to say my VI to write or not to let's say a 1D array to my 2D array on my front panel.

3rd - how can I mange it to delete that written line from that 2D array

thnx to all who solve my headache °_° - and ya I m labview newbie^^

Link to comment

QUOTE (marscru @ Mar 24 2009, 02:16 AM)

hi @ all,

3 problems: 1st - is it possible to have an event in an event structure coz my VI acting very slow - see freezes - if I do it.

2nd - If I can't use the event function how am I able to say my VI to write or not to let's say a 1D array to my 2D array on my front panel.

3rd - how can I mange it to delete that written line from that 2D array

thnx to all who solve my headache °_° - and ya I m labview newbie^^

1) Yes (anything is possible), but obviously you've seen the first of many consequences. Review the event programming caveats in the LabVIEW help for details and other rules. Nesting event structures is bad form I suggest you don't even think about going down that path. In fact, if you think you need more than one event structure in a given VI it's time to re-think your logic.

2) An event structure certainly be can be used to initiate this, but there's no reason to nest events.

3) I'd typically maintain a 3rd array to maintain an index set.

Also, from what your describing, assigning a row or column of a 2D array from 1D array may result in unintended padding or empty cells if the 1D array size is not constant. If you post your code with a few more operational details we may be able to provide better guidance.

Link to comment

As Dan mentioned it is possible but not advisable. I prefer to use a producer/consumer architecture and minimize my processing within the event structure to handling UI events and some custom events. I keep processing to a minimum. For the type of processing you are describing I generally pass that off to a parallel task that will not impact my processing of events.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.