LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to run a VI for very short time, e.g. 100ms?

Hi

Somil: I have Labview 8.5 so am unable to run the VI you attached. Thanks anyway.

 

I've attached the VI. There are two problems I'm facing.

 

1) It runs fine in highlight mode but otherwise it doesn't show any values in the "Macro" and "Micro" arrays, which it should.

 

2) The value coming out from the multiplication operator, which is connected to the "time" array is absolute time in picoseconds. I want the user to be able to enter the time in miliseconds in "Numeric 4", and the "Macro" and "Micro" arrays should only contain data according to that time. Note that the absolute time is itself a function of the "Macro" and "Micro" values. The problem I am now facing is that at each iteration, the "Macro" and "Micro" arrays directly get Max/2 values in one go, so I the time that the user enters has no effect on them.

 

Thanks,

Kaiser 

0 Kudos
Message 11 of 20
(772 Views)

Hi kaiser

 

first of all, i am attaching the VI for 8.5 version

secondly, your vi is missing some of the subvis (see attached pic) because of which i am unable to view your code

Somil Gautam
Think Weird
Download All
0 Kudos
Message 12 of 20
(766 Views)

One thing i want to ask. Why have you set the default values of the dimension of arrays so high???

 

Is this also the requirement of your code or its by mistake?

Somil Gautam
Think Weird
0 Kudos
Message 13 of 20
(761 Views)

thnx for the VI. will consider this option for implementation.

 

 attaching the SubVis.

0 Kudos
Message 14 of 20
(759 Views)

 


thnx for the VI.

You might like to say it officiallySmiley Very HappySmiley Very HappySmiley Wink

 

OK, i am checking your VI now

Somil Gautam
Think Weird
0 Kudos
Message 15 of 20
(755 Views)

Hi Kaiser,

 

comments on your code:

- never use a STOP function in your code - use a case structure around the remaining code...

- try to avoid all those coercion dots: maybe you could change this (missing) GetFifoData.vi to give data in DBL? You do all calculations in DBL, even scale by 1E-6 and the display the result as U32 (time)? I don't know what values you're working on, but I would expect a lot of zeros or rounded values in your display.

- At the moment you compare the time array with your numeric4, but always display the full micro/macro-arrays. There is nothing that limits the arrays to the interesting values... Here again a coercion occurs as Numeric4 is I32. So you calculate in DBL, display in U32 and compare with I32. Any reason for that?

Message Edited by GerdW on 10-30-2009 08:53 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 20
(754 Views)

Still missing

 

ok, for your future applications, try using LabVIEW project if you have so many Subvis. this will keep your code organized.

Somil Gautam
Think Weird
0 Kudos
Message 17 of 20
(752 Views)

Hi,

 

either use a project or put all vis in one folder (maybe using subfolders): this way you can provide one zip-file with all files needed in just one upload…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 20
(746 Views)

thnx for your prompt replies. As for the different data types, the VI contains parts from three different sources thats why. I didn't check for these differences. Will amend it. 

 

 

0 Kudos
Message 19 of 20
(724 Views)

Hi Kaiser,

 

even with different sources you should have to take care of correct (in terms of datatypes/coercions/rounding errors) calculations...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 20
(722 Views)