Greg

Thanks for the response, as I am extremely new to LV I am not aware of
many of the options available to me.

I shall look into some of the areas you have suggested above.

To add to the problem it may be required that the 'event handler'
acknowledges the calling function either after completion of the
handling code or before execution of the main handling code. This will
be dependant upon what the user is attempting to do.

the user may wish for the main C++ app to continue execution and
continue following is state machine, this would be achiebed by the
'event handler' acknowledging before executing any user LV code.

Alternatively the user may wish that the main c++ app holds off while
the user LV code performs some action, on completion of the 'action'
the acknowledge flag could be set which is picked up by the state
macine and the main c++ app then continues on its merry way.

Apologies for adding this extra bit in but exact requirements have
been a bit fluid !

Would I be best to simply use a global variable ? Not nice I know !

It would appear from my 'learnings' over the past few days that I
cannot simply use a sub vi for two reasons:

1) The event data of the call back vi must match the event data , this
would mean that all my events would require a 'return' or 'event data
out' value - clearly 'events' where not designed with this in mind as
they are not synchronous.

2) the ack may be required at ANY stage within the 'event handler'
code - the sub vi would only pass data out at the end of the user code
!

Without looking into the use of synchronisation objects it may be that
I need to use global variables

OR

I change my com interface to allow for polling rather than being event
driven...

Thanks for the comments and discussion , I am finding that by simply
discussing thhe issues I am gaining a much better understanding.

best regards

stephen

Reply via email to