LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital waveform

Aim of my VI: 1. PLC Digital Outputs are being switched from On and OFF through a relay. I have to read that signal and represent it in the digital waveform within a time period, using NI DAQ 6251.

2. The data should be represented in real time showing the pulse with X-axis having the time scale.

3. I have capture all the data and save in an excell file.

4. With minimum resolution of 1 to 10ms.

Please see my VI which I made and suggest.

I have a question, in my VI I have directly plotted the data coming from the digital read. What is the X-axis there?

Secondly I have used the time stamp to represent the actual time.

Which graph is correctly satisfying the purpose? Sorry I generally get confused with timing in the loop.

 

 

0 Kudos
Message 1 of 3
(2,189 Views)

I have modified the VI.

But two problem persist:

1. I want to have the X-axis sclae of the digital waveform should give millisec and it should be continous and real time. It is but the starting time of the X-axis is not changing at all. The data is getting clogged.

2. When I am saving the file with excel, the file gives the last value only and time values comes in exponential forms which are complicated to understand. I want the time should be represented in millisec and second column data should be in binary form, 0/1.

Please see the attached and suggest.

0 Kudos
Message 2 of 3
(2,172 Views)

Hi KRAZE4LV,

 

The following example demonstrates how to perform a continuous digital read that outputs the data to a graph:

 

NI Community Example: Digital - Continuous Input

 

I would recommend starting with this.  The graph, however, will not scroll as you have described.  To get the behavior you want, you should replace the Digital Waveform Graph with a Waveform Chart.  Here is a guide about the types of charts and graphs available:

 

Types of Graphs and Charts in LabVIEW 

 

To get your digital data into this chart, you will need to use the following VI from your Waveform Palette to convert your data to a compatible type:

 

Digital to Analog VI 

 

You can adjust the chart's history (right-click»Chart History Length...) to configure how many samples are shown at a time.  With this setup, your x-axis will be your computer's timestamps.

 

As for your file logging, the following VI performs the file i/o you are requesting:

 

Export Waveforms to Spreadsheet File VI 

 

Regards,

Regards,
Chris Elliott
x36772
0 Kudos
Message 3 of 3
(2,152 Views)