LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Periodic I/O server build error

Hi folks,

Im trying to create a periodic IO server through a Vi I built for a project and have followed the set giudelines in the Getting Started the LabVIEW DSC Module.  I'm getting the following fail when I try to build the IO server.

Warning, the controls you have choosen have either local variables, property nodes, invoke nodes or a reference. Using local variable or property nodes to access data will not read published data. Do you still want to generate the template VI?

I'm using local variables in my Vi along with an invoke node. I now realise this is a bad idea in relation to the IO server. What would be the best course of action for me to try and rectify this problem and if I have to build the VI again what should I use instead of LV's to try achieve the same/similar operation.I have attached the Vi.  
Any help would be great.

 

Regards,

David.

0 Kudos
Message 1 of 12
(4,743 Views)

Hello again Labview forumites,

 

I've had to step away from this project over the last few days to concentrate on other subjects. Im now back and hoping to build on what I have learned so far. Having searched the forum for similar problems/answers to the one im experiencing it seems that replacing my local variables with shift registers might be the way for me to resolve my issue. If this is the right course of action could someone please let me know if this means I have to rebuild the VI again from scratch and if so maybe point me in the right direction so as I can understand how to replace my LV's with shift registers and achieve the same operational sequence. Again all help will be greatly appreciated. 

 

Regards,

David.  

0 Kudos
Message 2 of 12
(4,680 Views)

As much as you probably dont want to hear this, you really need to re-write this VI from scratch.

You seem to use a series of while loops and a large number of local variables when neither are really necessary.

For example,  the 2nd and 4th while loops literally dont do anything except change several boolean values once.
What is the point of executing a loop exactly one time? Then you really dont need the loop, do you?

 

You should really look up state machine architectures, this would be a perfect application for one.

Post back if you would like some assistance in setting up a state machine.

 

Cory K
0 Kudos
Message 3 of 12
(4,674 Views)

You also have several while loops running in parallel.

Many of the controls have both read and write local variables in several of the loops.

I can see this becoming an issue because you will probably have race conditions occuring since none of the loops wait for the others to finish.

 

Also, may I ask what the purpose of the while loop in the bottom right corner is?
It appears you are generating a sin wave, calculating the mean, then writing this value to a table.

Mathmatically speaking, isnt the mean of a sin wave ~0 over a large number of points?
It also doesnt look like that has anything to do with the rest of the code, unless I am missing something

Message Edited by Cory K on 05-24-2010 12:31 PM
Cory K
0 Kudos
Message 4 of 12
(4,672 Views)

Hi Cory K,

 

Thank you very much for your reply.

 

The idea behind the project I am working on is to try and simulate the Control and Monitoring process in a municipal water management systemThe VI that I attached earlier is made up of three VI's i.e. Tanks filling and emptying, pump pressure simulation and a VI to simulate the mean from 25 samples of the liquid in the mixer tank and to show on the table that these samples are within the tolerance parameters set out. I guess I really should stress that this is just a very basic simulation and the most important part of the project is to use the Labview DSC module to first create a new project file which I thought I had completed successfully. I then must create an I/O serverFrom here I must create my shared variables, then a server VI and lastly a client VI. I have been working from a handout called "Getting started with the LabVIEW Datalogging and Supervisory Control Module" and successfully carried out the exercises laid out in this before starting out on my project assignmentAs you can probably tell I have little or no programming experience whatsoever but I am eager to learn. I have read about state machine architecture on this forum but would have thought it would be quite advanced for where I am at this point. That saidif this is what is required then I am more than willing to give it a go and at the same time I also have to try to understand what it is I am doing. Any pointers in the right direction would be a real help. Thanks again.

 

Regards,

David.

 

 

0 Kudos
Message 5 of 12
(4,657 Views)

OK that explination helps quite a bit.

Are you familiar with subVIs? You can write a VI, then save it and use it as a function within another VI.

This is referred to as a subVI.

 

From what I understand, you will need to write 4 VIs:
- Top Level VI

---- Tank level monitoring (subVI )

---- pump pressure simulator ( subVI )

---- mean simulator ( subVI )

 

This is not to say that you couldnt do all of the programming within a single VI (as you originally did) however it will be much neater and easier to read if you break it up into parts.

 

For the state machine, please take a look at the example I attached. I did not get to the pump pressure simulator or mean simulator yet.

However, the following VI is a replacement for the 5 while loops along the top of your VI.

This will act as the Tank Level Monitoring VI in your case.

* Note, this is not the correct/functioning VI, it is just to show you the state machine architecture and to give you a direction to move towards.

 

Please let me know if anything is unclear or you would like further assistance.

Message Edited by Cory K on 05-25-2010 10:21 AM
Cory K
0 Kudos
Message 6 of 12
(4,637 Views)

Hello again Cory,

 

Thanks alot for your help so far. Unfortunately I am unable to open the example of the state machine you attached as I am using Labview 8.5 student edition. This I know is something I should have mentioned from the outset. I am a familiar with Sub VI's and will work over the next while to try and convert my existing VI's to Sub VI's and then work to tidy my existing code up. With regards to the state machine, if you could post screenshots of the block diagram I may be able to glean some information from it and see if I can try replicate it in order to see it operate. This should also help me  gain a greater  understanding of the architecture involved. 

 

Regards,

David. 

0 Kudos
Message 7 of 12
(4,618 Views)

David,

I re-saved the VI for version 8.5

Are you able to open it now?

Cory K
0 Kudos
Message 8 of 12
(4,612 Views)

Yes Cory I can open it now thank you. I'll take a look through it and see if I can figure it out.

 

Thanks,

David.

0 Kudos
Message 9 of 12
(4,610 Views)

Hello again Cory,

 

Thanks alot for your help so far with this problem. I gotta be honest and say that I think even basic state machine architecture is about six months to a year more advanced than where I am with Labview right now. May I ask, in your opinion is the original VI that I posted a dead duck or is there anyway that I can salvage it to create my I/O server which in turn can lead me to create my shared variables. If this is not possible could you offer me an alternative without the state machine architecture. I don't want to sound ungreatful but I don't think that after using Labview for about a month im ready for the state machine. I really am appreciative of the help you have afforded me so far but unfortunately I think the clock is going to beat me if I persist with the state machine. Thanks again.

 

Regards

David.    

0 Kudos
Message 10 of 12
(4,571 Views)