Jump to content

How to write a two value function with time?


Recommended Posts

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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