zorro Posted August 1, 2008 Report Share Posted August 1, 2008 Dear all, I want to make a two value function with time: There are three controllers in the front panel, one is Voltage1, one is Voltage2 and another one is Time1. When the VI is running, from 0s to Time1, the value of the function is Voltage1; After Time1, the value of the function is Voltage2. In order to achieve this function, what block should I use? How can I get the time which is flowing? I am using LabVIEW8.2 on Windows XP SP2. I am new to LabVIEW and any help is appreciated. Thank you. Quote Link to comment
mross Posted August 1, 2008 Report Share Posted August 1, 2008 QUOTE (zorro @ Jul 31 2008, 02:07 PM) Dear all, I want to make a two value function with time: There are three controllers in the front panel, one is Voltage1, one is Voltage2 and another one is Time1. When the VI is running, from 0s to Time1, the value of the function is Voltage1; After Time1, the value of the function is Voltage2. In order to achieve this function, what block should I use? How can I get the time which is flowing? I am using LabVIEW8.2 on Windows XP SP2. I am new to LabVIEW and any help is appreciated. Thank you. Investigate shift registers. Quote Link to comment
JDave Posted August 1, 2008 Report Share Posted August 1, 2008 QUOTE (zorro @ Jul 31 2008, 11:07 AM) Dear all, I want to make a two value function with time: There are three controllers in the front panel, one is Voltage1, one is Voltage2 and another one is Time1. When the VI is running, from 0s to Time1, the value of the function is Voltage1; After Time1, the value of the function is Voltage2. In order to achieve this function, what block should I use? How can I get the time which is flowing? I am using LabVIEW8.2 on Windows XP SP2. I am new to LabVIEW and any help is appreciated. Thank you. There are various ways to achieve this, but it would really help if you could describe your desired result a little more. Are you changing the voltage on an analog line in hardware? Are you changing the value in software only? How much resolution do you need (ms, tens of ms)? Do you need to do other things while the timer is going? If you don't need to do anything else (as unlikely as that is) you could just set the voltage, use a ms timer, then set the voltage again. You would need to place this in a flat sequence structure. Quote Link to comment
zorro Posted August 1, 2008 Author Report Share Posted August 1, 2008 QUOTE (JDave @ Jul 31 2008, 01:28 PM) There are various ways to achieve this, but it would really help if you could describe your desired result a little more. Are you changing the voltage on an analog line in hardware? Are you changing the value in software only? How much resolution do you need (ms, tens of ms)? Do you need to do other things while the timer is going?If you don't need to do anything else (as unlikely as that is) you could just set the voltage, use a ms timer, then set the voltage again. You would need to place this in a flat sequence structure. Thank you very much. I want to use this VI to trigger another program. The voltage value is used to be an analog output. When it is Time1, the voltage number becomes Voltage1, which triggers another program to save data. Where to find "ms timer"? I made a VI and it didn't work. I will attach it later. Could you help me to check it? Thank you so much. My VI is attached now. Quote Link to comment
zorro Posted August 1, 2008 Author Report Share Posted August 1, 2008 QUOTE (zorro @ Jul 31 2008, 01:37 PM) Thank you very much. I want to use this VI to trigger another program. The voltage value is used to be an analog output. When it is Time1, the voltage number becomes Voltage1, which triggers another program to save data. Where to find "ms timer"? I made a VI and it didn't work. I will attach it later. Could you help me to check it? Thank you so much. My VI is attached now. Thank you for you guys help. I made a new one and it seems to work. But a new problem is that I can't get an array which includes time and Voltage data. The output of this VI should be an array, which includes time and voltage data. My new VI is attached. Could you help me with the array stuff? Thanks a lot. Quote Link to comment
LAVA 1.0 Content Posted August 1, 2008 Report Share Posted August 1, 2008 QUOTE (zorro @ Jul 31 2008, 10:22 PM) Thank you for you guys help. I made a new one and it seems to work. But a new problem is that I can't get an array which includes time and Voltage data.The output of this VI should be an array, which includes time and voltage data. My new VI is attached. Could you help me with the array stuff? Thanks a lot. Ditch the formula node. It's holding you back. Some pointers: -Add a wait to your while loop, it's currently eating your CPU -Add a boolean to you while loop, the stop-button is an emergency brake, you will damage your computer while you use this Here's a solution to turn in as your homework. (coffee has been very good today) http://lavag.org/old_files/monthly_07_2008/post-2399-1217536999.png' target="_blank"> Ton Quote Link to comment
zorro Posted August 1, 2008 Author Report Share Posted August 1, 2008 QUOTE (Ton @ Jul 31 2008, 03:43 PM) Ditch the formula node. It's holding you back.Some pointers: -Add a wait to your while loop, it's currently eating your CPU -Add a boolean to you while loop, the stop-button is an emergency brake, you will damage your computer while you use this Here's a solution to turn in as your homework. (coffee has been very good today) http://lavag.org/old_files/monthly_07_2008/post-2399-1217536999.png' target="_blank"> Ton Thank you so much. I am going to try it. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.