Showing results for 
Search instead for 
Did you mean: 

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



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

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:



Warmest regards,


Learning new things everyday...
0 Kudos
Message 2 of 14

Hi Ondik,


Firstly, please do not duplicate posts.

I've seen your other post on this link

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

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,

0 Kudos
Message 3 of 14

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

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,




0 Kudos
Message 5 of 14

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

0 Kudos
Message 6 of 14

Here you go !


0 Kudos
Message 7 of 14

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


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,

0 Kudos
Message 9 of 14

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



0 Kudos
Message 10 of 14