Jump to content

maxh

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

maxh's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I read a good chunk of the latest LabVIEW for Everyone and restructured my program from the ground up. It works just the way I want it to. I haven't worked on it in well over a month, but if I do ever get to work on this project again, there are a couple more minor things I want to add, such as the analysis of my pressure test data and reporting to a file and/or web page. No problem to do. So check it out and tell me what you think. Download File:post-6787-1169848555.zip Unzip, navigate to \...\auto\currently_used and run test_rig_auto_ctrl_3.vi. It has an interactive UI. The front panel is a tab control and in use I'll have the tabs at the top turned off. Upon running the VI the user is brought to the first tab, "board config", where they can set parameters. Once they're done, they press the "next>" button down at the bottom and they're brought to the "cycle config" tab. Here they can alter the cycle parameters and when they're done they have the choice of going back to board config, going straight to manual control, or starting the automatic cycling of the test rig. On this page they can also set the program to pause on the results page after every cycle of the test rig, or not. While the program is running, the "running program display" tab is activated and from here, the user can enter the manual mode at any time, and can also change back and forth between the "pause on results page" option. The test rig will usually be running 24/7 without any user watching, so it will usually be set not to pause on the results page. To make this happen, I stuck a case structure in a while loop (to make a state machine) but I also stuck an event structure in there for doing fun things with. I use it for a couple of purposes. First, whenever I want the program to pause (such as when waiting on the user to enter information into the config pages) I wire a -1 to the timing terminal to cause it to never timeout. Second, I use it to change the flow of the state machine. When you, for instance, press one of the buttons to go to the manual control page, the event case is activated which will feed out the "manual" case constant and a boolean to correctly control the selector whose output feeds into the shift register which carries the case structure's next value. Anyways, critiques, please? Do keep in mind this is my second labview program (a revision of my first one).
  2. I removed the main sequence structure and annotated the main VI's block diagram to better describe the intended operation. It's attached and I've included a screenshot for people that don't feel like downloading it. The VI does run fine wth the sequence structure gone. I used the "highlight execution" feature and discovered that the bottom right while loop (which I was trying to use to restart the cycle after it ends) was never turning on. I tried to be clever and wire the error output of my board initialization VI to the while loop so that it would start right away, but it still would not start because it was waiting on the boolean coming from the main while loop. I then tried moving everything in the "restart" while loop into the main while loop and the cycle start button perpetually remains false. When I manually press it it instantly pops back up. So now I'm going to take a little break and run some real wires! Thank you for the help. Annotated VI: Download File:post-6787-1164147441.vi Screenshot:
  3. Thank you for the insights so far! I have, indeed, been becoming more familiar with the data flow concept and have already removed one other unnecessary sequence structure. This main one will be next. Here's the files again, this time with the missing VI included: Download File:post-6787-1164133945.zip What do you think about the use of the sequence structure in the lower, left while loop where I try to sequence the shutdown of the program upon pushing the stop button? Do you have any insight into why it might not work? BTW, just a minute ago I ran the program without my DAQ boards plugged in and the stop button seemed to work just fine every time. Perhaps the error associated with not having the boards there ("Invalid board number") left the program stopped, not calculating intensely, so timing issues worked out? P.S. If you're curious, I've documented my intentions for the program operation as text notes inside of most of my sub VIs.
  4. First, I am new to LabVIEW, and to programming for that matter, so I apologize if I do a poor job of communicating on the topic. This is the first program I have written. It is for controlling an apparatus involving heater(s) and solenoid valves controlling water and air flow. The device which this test rig will be cycling undergoes a thermal cycle involving a heating ramp followed by a water cooling period until the device drops to the hold temperature, then an air blast to dry the water cooling lines. Once the cycle completes, the program should increment a counter and do a few other chores I haven't programmed yet, then restart the cycle. There is a manual control interface where the user can flip switches and monitor temperature, and an automatic control interface where (in theory) the user will enable and start the cycle, and can monitor temperature and other pertinent data. I wrote the program for manual control first (for which it works fine) and am now trying to implement the automatic control. So my problems/questions: 1. The automatic control works for one cycle only. After the cycle ends, it will not restart. I have tried to accomplish this task using the boolean "time has elapsed" outputs from the timers in the heat and water/air sub VIs to determine when to hit the cycle start button. The "Cycle Reset Pulse" timer in the bottom right while loop should feed a FALSE boolean to the Cycle Start button (via a property node) for a few milliseconds, then change it back to TRUE, mimicking the action of manually cycling the button. It doesn't work, though, and I can't figure out why. Can you? 2. Also, after the first cycle which works fine, manually restarting it by pressing the cycle start button seems to work, but it turns out that the water cooling portion doesn't work. Why not? 3. The bottom left while loop contains my attempt at turning off all output bits before terminating the program upon pressing the main STOP button. It kind of works, but sporadically. It doesn't turn all bits off (or on), and sometimes it doesn't turn off all stop buttons. But sometimes it does. Seemingly at random. What have I done wrong here? Any help or suggestions would be greatly appreciated. I am well aware that there are probably way better approaches to this program, and I would like to hear them. This is simply the first thing my completely inexperienced mind came up with. (I have zipped all VIs used. The main one is test_rig_control_6.vi) Download File:post-6787-1164129997.zip
×
×
  • Create New...

Important Information

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