LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataLogging ?

Does anyone know of any more information on how to use and get back
the information when you try to use Datalogging. I created a file
using datalogging for a sub vi and using the manual I tried to create
the program that would read the data back for me but I couldn't get
anything to work. I also couldn't find the icon they talked about in
any of the menu's. I want to get the data in this file because it may
help me debug a problem I'm having. Thanks for any more information
you can give.

Regards,

Steve Drake
0 Kudos
Message 1 of 13
(4,026 Views)
Steve:

Use the "Open File" function to open the datalog file. You will need
to wire a datalog type to the Open File function. To create this data
type, create two clusters (or cluster constants), one for the time
stamp and the other for the controls on the front panel of your subVI
that was used in the datalogging. The order of the elements in the
cluster that represents the panel objects must be the same as the Panel
Order. To see the Panel Order, go to the subVI that was logged and
choose Panel Order from the Edit menu. The time stamp cluster consists
of an unsigned 32-bit integer and an unsigned 16-bit integer for
seconds and milliseconds elapsed, respectivley.

Once you have created these two clusters, bundle them together as a
cluster, time stamp first, and wire t
he resulting cluster to the
"datalog type" terminal of the Open File function.


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
0 Kudos
Message 2 of 13
(4,026 Views)
UPDATE:

My apologies to Steve and others. It appears I forgot to mention that
the Labview G programming reference refers to the Time Stamp cluster as
consisting of an unsigned 32-bit and an unsigned 16-bit integer.
However, the order of the cluster must put the 16-bit interger before
the 32-bit or the read datalog file function will fail.


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
0 Kudos
Message 3 of 13
(4,026 Views)
I need some help. I construct the device for pressure measurement
25 channels by using 1 pressure transducer and 25 solenoid valves. I use
NIs DAQ board to acquire data and LabVIEW to control this device.
Sometimes I want the device to read from channels 1 to 25, I use For loop
to iterate from 0 to 24. However I want the device to read from 5 to 12
,sometimes, but I have no idea how to do that. For loop in LabVIEW cannot
set the initial index, right? Could you please suggest me?
Thank you very much.
0 Kudos
Message 5 of 13
(4,027 Views)
"Atit" writes:

> I need some help. I construct the device for pressure measurement
> 25 channels by using 1 pressure transducer and 25 solenoid valves. I use
> NIs DAQ board to acquire data and LabVIEW to control this device.
> Sometimes I want the device to read from channels 1 to 25, I use For loop
> to iterate from 0 to 24. However I want the device to read from 5 to 12
> ,sometimes, but I have no idea how to do that. For loop in LabVIEW cannot
> set the initial index, right? Could you please suggest me?
> Thank you very much.

Atit,

There is a very elegant way:

use a boolean array to select the devices to be read and put a case
structure into the for loop.

Johannes Niess
0 Kudos
Message 6 of 13
(4,027 Views)
In article <38759be3@newsgroups.ni.com>, Atit wrote:
>
> I need some help. I construct the device for pressure measurement
>25 channels by using 1 pressure transducer and 25 solenoid valves. I use
>NIs DAQ board to acquire data and LabVIEW to control this device.
>Sometimes I want the device to read from channels 1 to 25, I use For loop
>to iterate from 0 to 24. However I want the device to read from 5 to 12
>,sometimes, but I have no idea how to do that. For loop in LabVIEW cannot
>set the initial index, right? Could you please suggest me?
> Thank you very much.

I would suggest using some case nodes in there. Write out your
conditions, send them to the case node, and have the reading vi in the
case node for true,
and have an empty node for false.

Harry

--
0 Kudos
Message 7 of 13
(4,027 Views)
"Atit" wrote:

However I want the device to read from 5 to 12, sometimes, but I have no
idea how to do that. For loop in LabVIEW cannot set the initial index, right?
Could you please suggest me?
Thank you very much.

I can think of 2 ways to do it. The first is to go through the loop 25 times
and only use the iterations you need. Do this by testing to see if i is
greater than or equal to the lower limit, and less than the upper limit.
If it is in bounds, check the transducer. This is dynamic in that you can
check any range by entering the upper and lower bounds of the scan at run
time.

The other way is to loop from 0 to 7 and add 5 (or 6 depending on how you
do things) to i checking each time through. This is
not dynamic.

I hope that his helps,
Bob Young
0 Kudos
Message 8 of 13
(4,027 Views)
An alternative method is to create a reusable subVI that takes a
boolean array as input and returns a dynamic array of indices or values
corresponding to the "true" value boolean indices (If you return values
instead of indices, you will need to input a starting array that will
have its contents changed depending on the choices made with the
boolean array). You can then wire the dynamic array ouput directly to
the For Loop and the number of iterations will be determined at runtime.


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
0 Kudos
Message 9 of 13
(4,027 Views)
Am I missing something here? As I interpret the problem, Atit needs to
control valves and read only one channel since he has only one transducer.
To take it further along, he would need 25 bits to drive 25 valves, right?
So if he has no external mux he would need a 32 bit dio card. It is easy
from there, nestle the for loop within a while loop. Build the dio channel
list in a while loop and pass it to the for loop. This is dynamic, elegant
and easy to do.

Humbly Signed,
New Guy

PS: Please let me know if I am reading this wrong.

Atit wrote in message <38759be3@newsgroups.ni.com>...

I need some help. I construct the device for pressure measurement
25 channels by using 1 pressure transducer and 25 solenoid valves. I use
NIs DAQ board
to acquire data and LabVIEW to control this device.
Sometimes I want the device to read from channels 1 to 25, I use For loop
to iterate from 0 to 24. However I want the device to read from 5 to 12
,sometimes, but I have no idea how to do that. For loop in LabVIEW cannot
set the initial index, right? Could you please suggest me?
Thank you very much.
0 Kudos
Message 11 of 13
(3,666 Views)
> Does anyone know of any more information on how to use and get back
> the information when you try to use Datalogging. I created a file
> using datalogging for a sub vi and using the manual I tried to create
> the program that would read the data back for me but I couldn't get
> anything to work. I also couldn't find the icon they talked about in
> any of the menu's. I want to get the data in this file because it may
> help me debug a problem I'm having. Thanks for any more information
> you can give.
>

The other responses describe how to do this using the lowest level file I/O
icons. The other way is to drop the same subVI icon on the diagram, popup
on it and choose Enable Database Access or something very similar. This will
put what we refer to as a datalog
ging halo around the icon that allows you
to specify which datalog record you want back, and you can also wire to any
of the icon terminals to read back specific control/indicator values as well
as to the timestamp and other values.

Greg McKaskle
0 Kudos
Message 4 of 13
(4,027 Views)