LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital(sw-time) and analog(continously) in one graph?

Hello,

 

i have usb-6008 when (DI is sw-timed) and AI when i want (continous sampled) and then the both signal show in one graph, is it possible, please could you writte me how can i do it?

0 Kudos
Message 1 of 14
(1,764 Views)

Hi Ondik,

 

Do you have any current VI which you are working on until you encountered this issue? If so, can you provide your VI so that we can advice you accordingly?

 

What is the final value of the DI? Did you convert it from boolean value to a numeric data type? 

 

Here are some materials related to multiple plots in same graph:

http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657

http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/types_of_graphs_and_charts/

 

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 2 of 14
(1,721 Views)

Hi Ondik,

 

Firstly, please do not duplicate posts.

I've seen your other post on this link http://forums.ni.com/t5/Multifunction-DAQ/usb-6008-DI-is-sw-timed-and-AI-when-i-need-continous-sampl...

and it is exactly the same question.


To answer your question, you have couple solutions:

 

1. As it was stated in the previous posts, you can acquire the data on another analog line, and than you will see your signal displayed on a waveform graph.

2. In case you still want to use data that are acquire on SW DIO and Hardware time Analog Input you can do the following.

When you acquire data from Analog Input, the data have the following strucutre - a cluster that contains three elements: T0, dt, and Y - an array of samples.

More details here http://digital.ni.com/public.nsf/allkb/B965F316364DE17B862572DF00363B10

Basically, you can programmatically build a waveform from the static data you have. Let's say, every iteration of your while loop, you will receive one boolean value and waveform data that contains 100 samples of Analog Input. You can create the Y array with 100 samples of an double value (5V for TRUE and 0V for False, or any logic level you are interested in), copy the dt and T0 value from the waveform received on Analog Input measurement. Later, you build an array of waveforms (AI and DI) and you represent it on a graph.

 

I still believe that the first solution is easier to implement, but if for any reason you can do it, you can use the method described above.


Best regards,
IR

0 Kudos
Message 3 of 14
(1,683 Views)

Thank you for your answer, i am interested in point 2 from IonR, but i do not understand very well, do you know is somewhere similar code with them, i would like test it, thanks ????

0 Kudos
Message 4 of 14
(1,653 Views)

Hi Ondik,


That's how the VI will look like.

 

I have simulated a sinewave and converted the digital information to 0 or 1. You can change the logic and represent it as TTL if needed.

 

Best regards,

IR

 

 

0 Kudos
Message 5 of 14
(1,650 Views)

Please IonR, i have version of labview ver. 2010 and you have 2013, can you convert it?

0 Kudos
Message 6 of 14
(1,647 Views)

Here you go !

 

0 Kudos
Message 7 of 14
(1,640 Views)

ok, great!

 

and could you writte me how can i show this data in graph in real time, is it possible?

0 Kudos
Message 8 of 14
(1,637 Views)

Hi,


What do you mean by showing it on a graph in realtime? 

It is represented on a graph.

What needs to be changed is to replace the simulation data with real data from a hardware.

 

What device are you using? What sample rate do you use for Analog Input?

 

Best regards,
IR

0 Kudos
Message 9 of 14
(1,634 Views)

i have usb 6008, i want to sample rate will by optional by user (for usb 6008 - max 10kS/s for one channel...)

 

in realtime i mean: axis x will be actual date and time

 

thanks

0 Kudos
Message 10 of 14
(1,629 Views)