08-06-2024 09:17 AM
Hello,
I’m a biomechanics researcher and currently deal with a LabVIEW template to measure electromyogram (EMG) data.
I have a question that I could not solve. In LabVIEW, I have set up a system to display a EMG signal on a graph (chart) that flows from left to right. The data is being recorded correctly. However, the issue is that instead of having the signal appear from an empty screen and move from left to right as new data is measured, the signal is already displayed in a straight line and responded only when fluctuations appearing (normally working). How can I achieve the effect where the signal starts from an empty state and progressively appears from left to right without the tail being present initially?
If anyone could kindly provide a solution or guidance, I would greatly appreciate it.
Thank you.
08-06-2024 10:37 AM - edited 08-06-2024 10:38 AM
We cannot tell what you are doing wrong (there are billions of possibilities!) unless you actually show us what you are doing. Please attach a simplified version of your VI and tell us how you use it.
Replace the IO with a random generator and make sure to "save for pervious, 2020 or below" before attaching.
08-06-2024 12:07 PM
Check out the Chart example
08-07-2024 02:21 AM - edited 08-07-2024 02:23 AM
To. altenbach
Very thank you for answering my question.
As you told me, I share the VI (template) and an attatched photo (expressing a problem I questioned).
I setup the VI that is simultaneously working and measuring multi-asix force (FROM NI DAQ Nano17 TO LabVIEW block diagram) and EMG (from Delsys; FROM EMGworks (a Delsys hardware) TO NI USB-6210 TO TCP/IP in LabVIEW block diagram).
And, the VI is normally working. the VI is have been made and operated on 'NI LabVIEW 2015 SP1 (32 bit)'
I am looking forward to receiving your reply.
Sincerely yours,
From. HSKHS
08-07-2024 03:12 AM
Hi HSKHS,
@HSKHS wrote:
As you told me, I share the VI (template) and an attatched photo (expressing a problem I questioned).
I setup the VI that is simultaneously working and measuring multi-asix force (FROM NI DAQ Nano17 TO LabVIEW block diagram) and EMG (from Delsys; FROM EMGworks (a Delsys hardware) TO NI USB-6210 TO TCP/IP in LabVIEW block diagram).
Well…
08-07-2024 07:34 AM
Without seeing your code, but listening to your description, it sounds like you are (correctly) using a Chart to plot your data. I assume the Chart is initially clear (nothing plotted) -- if not, create a Property Node for the Chart showing the "History Data" (the last element in the list of Property Values), right-click its input, and "Create Constant" (which puts an empty array of whatever Type the Chart accepts, effectively clearing it).
Until you start writing values (to be plotted) to the Chart, it will remain empty. When you start giving it values, they will appear left-to-right, and start scrolling (right-to-left, as values are added on the right).
Bob Schor
08-07-2024 08:26 AM
Hi
I checked your code and the EMG signals are being plotted on a waveform Graph, instead of Chart.
You are also adding new incoming data into an existing array that goes into the shift register creating the behavior that you don't want.
If you plot directly into a plot graph it will create the effect you want.
08-10-2024 10:21 AM
Do you want your plot to scroll (that is, start at the left, adding points to the right until the screen is full, then continuing to add points to the right and having the other points shift left)? Then you want to use a chart, which has a fixed-size buffer that LabVIEW manages for you "behind the scenes" so you only need to worry about adding the "latest data". Charts also have two other modes -- a "Scope" mode (which works like an oscilloscope, blanking the Chart when full and starting the next sweep from the left (to right) again, and a "Sweep" mode, similar to "Scope", but without erasing the entire Chart when a new Sweep starts, only erasing the points being "replaced".
Many years ago, I read a fascinating article by @CoastalMaineBird that he called a "Monster Graph" (and I call a FlexiGraph) that uses clever tricks to create (using a graph) something that acts like a Sweep Chart, but lets you have several "X Gains" (so you can see the last 10 minutes, 30 minutes, 60 minutes, 3 hours, 10 hours) of your data (which you are constantly streaming to disk -- the data being plotted remains in memory, and takes surprisingly little time to update). I believe his company is called "Culverson Software".
Bob Schor