LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm seeking suggestions to create a data message playback system

I am working with a data message table and want to playback the data with timed, FFw, Rev or pause functions.
Details:
Table contains different messages like rows in a spreadsheet.
Each message row is sent one at a time and is comprised of binary hex data that must be decoded and displayed on the screen.
I'd like to use event structures to step through the data and view the decoded messages.
Does anyone have example vi's that may solve my problem or provide direction?


0 Kudos
Message 1 of 6
(3,171 Views)
Hi jdam,
 
Thank you for posting in our forums. LabVIEW is a very powerful and versatile tool that should be able to accomplish some of your tasks. First, I just want to clarify some things about your issue. With this data message playback, is there a specific file format that you were looking to use? Or were you just looking to display the results back on the screen? If your data is stored in a spreadsheet file, then I'm assuming you have some sort of two-dimensional array of data. You can use some of the array functions, such as Index Array, to pull out each row on each iteration of a while loop and act on that data. This action can include performing a conversion from the binary hex data into whatever specific format you are trying to use. We have functions like the typecast function and other format conversion functions in the String/Conversion Palette of VI's that can help accomplish this task.
 
You should be able to use a simple user interface that has a button for each playback action. Each of these buttons can be tied to a specific event in an event structure. Using the appropriate converted data format, you can have each of these events perform whatever actions or display with your data depending on the button that is pressed. Was this the type of functionality that you were looking for? If you wouldn't mind elaborating a little bit more on your steps, I would be able to give you more detail to push you along a more specific path. I hope that I'm understanding you correctly. Take care and have a great day!
 
Regards,
 
Matt G.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,151 Views)

Matt G.

Sorry for the delay in reply, I've been busy and on travel.

I'm using a tableplay.vi supplied by another NI engineer (Jeffrey Phillips). It uses events. My input table file can be quite large (200,000+ rows X 40 Columns) and I notice that the REW and FF seem to respond well, however, the vi doesn't always see the stop button and I find I have to press it several times to get a response. can this be improved? Also, is there a better method of importing the table instead of loading it all at once.

0 Kudos
Message 3 of 6
(3,133 Views)
Hey jdam,

I took a look at the VI that you were using and have a couple of suggestions.  To answer your second question first, you might consider writing the table values outside the loop to prevent the entire table from being written each iteration of the loop.  Unless your data set is really really really large I don't see any reason why loading and displaying it all at once would be detrimental to your program.  I don't have a good reason why the stop button is being delayed, other than it is completing another event case before the stop button has a chance to run.  Have you tried watching the VI with highlight execution on?  This should give you a good idea why the stop button is not responding as you would expect. 

Please let me know if you have any questions!
Andy F.

-----------------------------------------------------------------
National Instruments
0 Kudos
Message 4 of 6
(3,124 Views)
Andy,
I think I've found my problem with the stop button. If I press in the middle on the red square, nothing happens. However, If I press the edge off of the square, it works fine. Can you tell me how this control was made and why pressing the red square doesn't work?
 
Also, I never intended to leave the table control display in the vi, but it does work much better with it outside the loop.
 
Thanks
0 Kudos
Message 5 of 6
(3,107 Views)
jdam,

I took a look at the VI and did notice something about that control.  The control was built by placing a decoration on top of the button and then grouping the button and decoration.  This could explain why you are seeing that odd behavior.  To fix this I would suggest ungrouping the control then right-clicking the button, and selecting Advanced » Customize... and then editing the button there to create a custom control.  You can actually copy the decoration and use that to create the control.  Once you save the control you can use that instead of the button.  Does that work? 

Let me know!
Andy F.
-----------------------------------------------------------------
National Instruments
Message 6 of 6
(3,086 Views)