01-17-2017 02:49 AM
I'm hoping someone can help me integrate the function of 2 VIs I've created together. I wrote basic LabView code about 10 years ago so I'm rusty but understand the priniciples. I don't need a full worked solution just helping hand that I can tidy into my LabView program.
My system consists of 10 heaters with 10 associated temperature probes (RTD). The program needs to be able to measure and display the temperatures continuously. The program also needs to allow the user to switch on any one of the heaters for a fixed period of time (between 0.5 and 15 seconds). There is some electronics to switch the heaters that allow the NI hardware to use simple digital outputs.
I am using LabView 2016 and a compactDAQ chassis with 3 modules:
2 x NI9216 (for the 10 RTDs)
1 x NI9403 (for the Digital outputs)
I have 2 Labview VIs, one which uses a DAQ assistant to gather the temperatures and output to a chart (screenshot attached). It's really simple and does the job. The second uses a for loop to allow me to select and switch on a heater for a fixed period of time (the programming is really clumsy but it proved my hardware and shows the principle of what I want - even if the implementation is naff!) - VI attached.
I need to integrate these together but whenever I try this the two loops interact making the heater switching not work or the temperature not display rapidly. I've spent a few hours thinking and trialing things and I believe I need to add the heater switching into the temperature VI while loop. Any help on how to do this would be really appreciated as I'm supposed to have this working by end of tomorrow!
===
FInally, some implementation thoughts (feel free to ignore - these are my thoughts about how I thought I could get it working):
Have a momentary boolean switch outside the while loop that is default false
When the switch is pressed a timestamp is recorded and the DO line is switched to true
The number of 'heater on' seconds is added to this timestamp
The loop checks continuously if the current time has past the timestamp+heater on time - if it has DO = false otherwise DO = true
I haven't found a way of coding this 😉
01-17-2017 09:26 AM
Suggestions, requests, and recommendations:
I hope that will get you started.
Bob Schor