10-30-2009 02:01 AM
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
10-30-2009 02:36 AM
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
10-30-2009 02:42 AM
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?
10-30-2009 02:43 AM
thnx for the VI. will consider this option for implementation.
attaching the SubVis.
10-30-2009 02:49 AM
You might like to say it officially
OK, i am checking your VI now
10-30-2009 02:51 AM - edited 10-30-2009 02:53 AM
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?
10-30-2009 02:54 AM
Still missing
ok, for your future applications, try using LabVIEW project if you have so many Subvis. this will keep your code organized.
10-30-2009 03:01 AM
10-30-2009 03:44 AM
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.
10-30-2009 03:50 AM