12-08-2025 07:56 AM
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:
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.
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?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Solved! Go to Solution.
12-08-2025 08:11 AM
Attached is my test VI if anyone care to play.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-08-2025 08:42 AM
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:
Here's a zoom of the start of that same plot:
Is there just no way to make an X-Y plot for digital data?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-08-2025 08:50 AM
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...
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-08-2025 09:07 AM
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.:
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 !
Blog for (mostly LabVIEW) programmers: Tips And Tricks