LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom V.I based server question

Solved!
Go to solution

Hi,

I need to use the DSC module to create a periodic I/O server. I have designed a working V.I to use as my server V.I. I have read that there are some do's and dont's when creating a server V.I with regards to certain functions. I found this page on the N.I website

 

 http://zone.ni.com/reference/en-XX/help/371618K-01/lvdscconcepts/dsc_perioioserv/

 

The following bullet point from the above page has me concerned about my V.I -

 

"Make sure the VI does not contain any Event Structures or user interface interaction."

 

I have a "display message to user" function in my V.I which requires an "OK" button to be pressed. Will this be an issue? Is this what could be called a "user interface interaction?.

 

This message is used in my server V.I to pause the V.I until the "OK" button is pressed.

If this is an issue is it possible to create a shared variable for it so I can access it from another V.I in my project library ?

 

Thanks in advance.

 

 

 

0 Kudos
Message 1 of 3
(2,180 Views)
Solution
Accepted by topic author Jimbob86

Yes.  That would be user interaction because you are asking the User to press a button.

 

Servers are meant to run autonomously.  That means they do their thing without any interaction.  So why do you need a VI that pauses until the user says OK?

 

You could put in case structure around all that so that if  you wire up a True, it doesn't run that code that pauses, it just pass through the True just like you hit the OK button.  If you do it right, you can set that value programmatically to true when you want it to be in server mode, and false if you want to use that same VI elsewhere as a user interface.  But you really have two different modes of operations that should be determined when you start the VI.  I wouldn't mess with shared variables controlling it from elsewhere.

Message 2 of 3
(2,164 Views)

Thanks for clarifying that. I have abandoned the user message and came up with a different solution.

Thanks again.

0 Kudos
Message 3 of 3
(2,123 Views)