Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to communicate with a PCI device using LabVIEW

Hi,

I have some question Measurement & Automation -> Data Neighborhood
Do I need to create channels here? if I create chanels (current and voltage) in DAQ Assistant in labview program.
If so, what I must to chose one of  the: NI-DAQmx Global Chanel, NI-DAQmx Tasks or Traditional NI-DAQ Virtual Chanel?
I think the first one (NI-DAQmx Global Chanel)?

And anouther problem
in simple program wirth DAQ Assistant and Waveform Graph I started use this and I jast seeing Voltage Graphic in changing voltage I seeing changing, but the Current is just a line at 0 and not change. What is a problem with Current? or current chanel?

0 Kudos
Message 11 of 19
(3,440 Views)

Hello Justinas,

If you create channels in the DAQ Assistant in your LabVIEW program, you do not need to also create them in Measurement and Automation Explorer (MAX).  You only create channels or tasks in MAX if you want to later reference them in your program without creating them in your program.

If you are displaying both your current and voltage measurements on the same graph, the current measurement is probably very small compared to the voltage measurement, so you cannot see the change.  You could split the two measurements and then display them on two separate graphs so that both signals can be autoscaled appropriately.

Regards,

Laura

0 Kudos
Message 12 of 19
(3,418 Views)
I attaced simple program of two channels.
How can I do, when I starting watching a graphic, in time place it showing exact time (hour minute and second, like) or some nonsense nomber, I want to do that it start's at 0 (like 0, 1, 2, ... seconds).
And how to record this data in file, what graphic is displayed?
could you show some simple example or anouther way to show me how to do.

Thanks,
Justinas

Message Edited by Justanas on 11-20-2006 08:46 AM

0 Kudos
Message 13 of 19
(3,311 Views)

or just correct my attachment Smiley Indifferent

Message Edited by Justanas on 11-20-2006 08:53 AM

0 Kudos
Message 14 of 19
(3,314 Views)
 

Hello,

Your questions now are about axis formatting, and File I/O.

For axis formatting, you should take a look at the properties of your Graph (right click and select Properties, then click the Format and Precision tab).  These properties are also available for programmatic access using property nodes for the graph.  The graph itself can take a cluster datatype which wraps an x0. delta X, and the array of data to help you format how it is displayed - use the context help and hover over the waveform graph on your block diagram for more information - you can also use the LabVIEW Help to read more about this.

For File I/O - you have the choice of writing binary or ascii data.  If you want the file to be human readable, you'll want to write ascii.  If you just want to store data, and perhaps access parts of it from that file, storing it in binary format will be better.  You can use the array to spreadsheet string function to get your array of data to ascii if you want to write text files.  For binary files and to learn more about distinctions between those techniques, carefully read the following documents and check out the LabVIEW shipping examples for File I/O (click the Browse tab in the Example Finder, and choose Fundamentals -> File Input and Output).

How Can I Write and Read Binary Files Using LabVIEW? 

Optimizing File I/O in LabVIEW and LabVIEW RT 

I hope this helps!  The best way to get started will be to first understand the difference between writing binary and text (ascii) files.  Then determine which is best suited to your application.  Then look at some simple examples and independently write yourself a simple example so you are sure you understand how to do this in LabVIEW.  Then you'll be ready to integrate those ideas and File I/O code into your application.

Best Regards,

JLS

Best,
JLS
Sixclear
0 Kudos
Message 15 of 19
(3,274 Views)
I create data string recording my data, I attached the file.
How to do, that it recorded file will be "Time" and data, not only data.
For example now I have:
-50.012207, -0.296936,
-50.054932, -0.349121,
-50.024414, -0.388489,
-50.015259, -0.417786,

I need something like
time (s)
0.00,    -50.012207, -0.296936,
0.20,    -50.054932, -0.349121,
0.40,    -50.024414, -0.388489,
0.60,    -50.015259, -0.417786
0.80
1.00
0 Kudos
Message 16 of 19
(3,138 Views)
Justanas,

I hope you are doing well today! You could use the Elapsed Time express VI which can be found by right clicking on the block diagram and selecting Programming -> Timing. You could also use the the Get Date/Time String VI. After getting the time in seconds, you can concatenate it to the string as you have done with other values in your application.

Message Edited by Adnan Z on 12-12-2006 10:17 AM

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 17 of 19
(3,117 Views)
Thanks Adnan,

but if It is possible to change Elapsed Time format?
now I have something like:

0  00:00:00    -100,00    -0,78
0  00:00:00    -100,00    -4,16
0  00:00:01    -100,00    -5,01
0  00:00:01    -100,00    -5,28
0  00:00:02    -100,00    -5,29

For me needs value with Milliseconds (ms) for example
0,0000  0,0500  1,0505  1,5500 2,500.....

0 Kudos
Message 18 of 19
(3,097 Views)
Justanas,

I hope you are doing well today! The Elapsed Time VI has an output Elapsed Time (s) which gives the output in seconds. You can multiply this value by 1000 to get the value in ms. If I didn't understand your question right, please be sure to let me know.

Message Edited by Adnan Z on 12-13-2006 02:39 PM

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 19 of 19
(3,085 Views)