LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital graph - is variable X scale possible?

Solved!
Go to solution

LV 2023, Win 11

I'm an old hand at LabVIEW, but brand new at using DIGITAL GRAPHS.

I am sampling 24 bits at some rapid rate (say 1000 Hz).  My board is PXIe-6355.
What I want to plot is the TRANSITIONS in this data, which will occur much more slowly, say 0.1 Hz, but not regularly.
I need to know WHEN they occur (to the nearest mSec) without recording the whole bloody mess.
For example, if I have three samples:
Time      Data
12345    000000000000000000000000

13567    000000000000000000001000

15457    000000000000000000001001

 

I want to see bit 3 transition at 13567 and bit 0 transition at 15457, without supplying all the samples in between.


I already have the transition detector working - I get an event with 24 bits of data when any of those bits has changed.

When I try to PLOT the resulting data, I can't seem to get the graph to cooperate, and I don't see why.
I have a barebones VI to try to figure it out, and this is what I get:
image001.png

Only one "bus" (group of 8 bits) shows. After the first 0-->1 transition in bus 0, it stops graphing bus 1&2.  I can let it go all day and it never plots anything further on bus 1 or 2.

Here's the code for my little experiment.  The loop samples every 50-100 mSec, simulating variable transition timing.


image002.png

 

The upper shift registers are U8 throughout.  If I wire the BUILD ARRAYs in reverse order, then it's bus #2 which shows correctly and the others don't, which tells me it's something about the data itself.  It's like if it doesn't see a transition for X samples, it shuts itself off.

If I wire the same data into all three BUILD ARRAYs, then it shows all three busses correctly.

I'm obviously missing something - any ideas what?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(147 Views)

Attached is my test VI if anyone care to play.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 5
(136 Views)

More info: it's NOT true that nothing changes if I let it run.  If bus #0 overflows (bit 1 goes 1-->0) there IS a transition on bus 1.  But it doesn't plot the time correctly:
Screenshot 2025-12-08 093526.png

 

Here's a zoom of the start of that same plot:

image001.png

Is there just no way to make an X-Y plot for digital data?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 5
(113 Views)

If I use a single U32 then things plot the way they should, except I don't want to display 32 lines, I have 24.
Maybe there's a way to trim that down...

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 5
(101 Views)
Solution
Accepted by topic author CoastalMaineBird

OK, that's the ticket.  I have to use 32 bit tools and trim it down to 24 bits myself.
Not sure why I start at bit 8 and go for 24 bits, but that's what it takes.:image002.png

 

image001.png

 

The DATA array contains the state of all 24 bits, at each transition of ANY of them, which matches the data I have.  The TRANSITIONS array matches the data I have -so, it's all good.

Attached is the updated VI, if you care to play.

Thanks for listening !

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 5
(85 Views)