12-25-2023 11:08 AM
Have you done any basic tutorials about dataflow and program architecture?
You have an outer loop and an inner while loop on top and a deep Aztec pyramid of case structures at the bottom, all cases containing controls or indicators with duplicate names. That's not manageable!
The pyramid of case structures depend on the upper while loop, so they cannot execute until that while loop has finished. At this time, depending on the value in the orange wire, one of the deeply hidden lower while loop will run until manually stopped by the correct stop button (or on error), only once this happens, the toplevel loop can go to the next iteration.
As you can see, the dataflow is very constipated and replies on user input to proceed. Why is there so much duplicate code? Can you explain what the various cases of the case structures are supposed to do? What is the program supposed to do?
All you probably need is a simple state machine with exactly one toplevel loop and no inner while loops.
Can you please fill all controls with reasonable default values before attaching code? Are all these VISA resource names the same or are these different devices?
12-26-2023 12:16 AM
Actually i am working on a project which demands automatic power supply depending on the temperature of the heater, which is being measured by a DAQ. When temperature is minimum give maximum power supply, on gradually increasing the temperature decrease the power supply. so I made different cases for different interval of temperature(eg. <40,40<T<80 and so on) and accordingly providing the power and i know the maximum temperature that is set point.
So suggest me how can I proceed.
12-26-2023 02:04 AM - edited 12-26-2023 02:06 AM
@MahmudulHasan123 wrote:
So suggest me how can I proceed.
Christian already told you: Learn dataflow programming by following the links under NI Learning Center at the top of the LabViEW forum. Learn the principles until you are comfortable to start looking into State Machine programming. Then you can tackle this problem in a few hours and understand what you are doing. We could program it for you but then you have no idea how it really works and couldn’t even make very simple modifications to it.
12-26-2023 10:06 AM
@MahmudulHasan123 wrote:
Actually i am working on a project which demands automatic power supply depending on the temperature of the heater, which is being measured by a DAQ. When temperature is minimum give maximum power supply, on gradually increasing the temperature decrease the power supply. so I made different cases for different interval of temperature(eg. <40,40<T<80 and so on) and accordingly providing the power and i know the maximum temperature that is set point.
So suggest me how can I proceed.
Your explanation is equally confusing and maybe this is a language problem. Maybe you can explain it in your native language and we can use Google translate to read it.
Do you have one power supply where you just modify the power or does each power require a different power supply? Your code seems to freshly configure four different(?) serial instruments depending on case but they all have the same default parameters.
12-27-2023 10:13 AM
I'm using LV 2019 so can't open your code, but it sounds like you're doing basic temperature control. This is usually performed with a PID controller: Proportional–integral–derivative controller - Wikipedia
Labview has built-in PID modules, but a simple proportional only version is easy to code. Once you learn LabVIEW to the point you can make a simple state machine, this will be easy to accomplish.
12-27-2023 11:13 AM
@NIquist wrote:
I'm using LV 2019 so can't open your code, but it sounds like you're doing basic temperature control.
A quick glance at the Rube Goldberg code:
12-27-2023 11:45 AM