04-08-2010 04:34 AM
How can i input a time input as the time to count elapsed when a condition turn to be true!
or- just how to input a time value in millisecond, i have tried to using the Tick count, but this can only produce one value, what want is a continuous time value, used to generate a voltage out put according to the time value.
04-08-2010 04:44 AM
04-08-2010 08:13 PM
04-14-2010 03:59 AM
Sorry, I am still not quite understand this function.
this time input is still not the real time ~ i mean, what i expected is that the graph will be generated continuously as the time pass away,
like continuously drawing out the graph!
but this waveform built is more like generate the profile instantly.
It's more like the one i have attached below.
The reason i am asking this is because i wanna to continuously input a position command to the motor according to the profile i have generate, and i want to this time to be the real time. Not the digital time in the computer screen that you have seen, but the real time.
and i have ask this question before, haven't got the answer yet!
http://forums.ni.com/ni/board/message?board.id=170&message.id=489245#M489245
04-14-2010 04:07 AM
LabView is such a powerful software, can't even generate a signal like a watch???
What i want is a watch, a timer, which can count time elapsed between two command that i send to the computer.
and this should give a series of number just like the watch(timer) did, according the the resolution that i have defined.
It's really unbelievable that it would be so hard for me to find a such program form all the labview functions, I really can not believable this!
04-14-2010 04:12 AM
Hi 14,
"it would be so hard for me to find..."
I also don't understand what's so hard to look at the time functions palette
From your attached block diagram:
You already use a "time resolution" which translates to the dt input of the waveform datatype.
You don't use any start time in your VI, so we suggested to use the system time...
"Not the digital time in the computer screen that you have seen, but the real time."
Could you please clarify the difference between "time in the computer screen" and "real time"?
For me there's no difference (atleast no difference bigger than ~200ms)
04-14-2010 04:28 AM
what i mean by ~~ the time you seen in the screen ~
is like a velocity profile, and you see that the X axis is for the time. and this is just the time that you defined ~
how are you going to let the machine move according to the number that you have entered??
I do have seen many functions under the timing, but i just can not find the one that i want.
Non of them seems being suitable for me.
For me, the main problem is how to command those time signals.
How to command the machine to move according to the time that i have defined.
it's like, at what time, i want this machine to do something ` but how can i tell the machine?
and i want this process being in a millisecond scale, in order to have a smoothly position profile.
04-14-2010 04:36 AM
Hi fourteen,
"how can i tell the machine?"
Read the manual of the machine!
Most "machines" don't work like "at time x move to position y", but rather "from current postion move with speed z (+ acceleration a) for time t". Think about it...
In the timing palette you find functions that give you the current time as timestamp and functions that give you a relative ms counter. Both values can be used for math functions. What else do you need?
04-14-2010 05:24 AM
what i mean by "at time X move to a position Y" is because the machine i am currently dealing with is just a simple DC motor, and i want to input a velocity profile, this profile will tell the machine to move at a certain speed at a specific time, and this command will last for a sample time!
Can the timestamp function return me the time in millisecond?? I didn't make it out.
For the relation ms counter, which function do you mention?
the tick count? the wait? wait until next ms multiple??
can those function return me the time elapsed just like the watch?
if all those are possible ~ can you show me a sample,
something like ~ the Vi will output 10
at 10s m and out put a 20 at 20s,
and continuously last for 2 minutes???
what i want is exactly like this ~ nothing about the machine~
i just want to out put some number at a certain time ! at the time interval for my case should be millisecond
.
04-14-2010 05:56 AM - edited 04-14-2010 06:01 AM
Hi fourteen,
what kind of hardware (computer) do you use? Windows will not be suitable for (accurate) ms intervals...
Unless you use a waveform (with dt=1ms), including a curve for your output values. DAQmx is able to output that too...
- There's an ExpressVI named "Elapsed time", have you played with it?
- Otherwise take the current "tick count" and subtract an older tick count to get the elapsed time.
- Timestamps also include µsecond values, it's just a matter of formatting (or type conversion to DBL)...
For an example you will have to wait a little bit