Jump to content

Combine D/A and ASCII file read


Recommended Posts

I'm a Labview beginner, and want to synchronize the data read from an ASCII file (desired values) and real time D/A.(measured values)

How can I input both signals with a freq. of 100 Hz, and display them in the same graph?

Hi Basbiker:

Welcome to the forum.

I'm not totally sure I understand your question-- and perhaps others don't either, which might explain the lack of any response.

Clarify a couple of things to help us to help you:

1. I assume you mean A/D (input), not D/A (output)?

2. Not sure what you mean by synchronizing with the ASCII file--- If the data is already in the ASCII file when your program goes to read it, how did it get there on a real-time basis?

Doing real-time synchronization with anything that goes through the Windows OS (file read, read serial port, etc.) is generally difficult to impossible if your idea of real time is 100 Hz. Even at 10 Hz, "synchronization" in the Windows environment is unreliable and approximate at best.

But if you try to clarify exactly what you're doing, perhaps there is a way, and if there is, someone here can help. (Might even be easy, if I totally misunderstand what you are asking :D .)

Best Regards, Louis

Link to comment

If I understand correctly, you should be able to just preload the file data into an array.

If the data is already at the correct rate, you can leave it as is. Otherwise you will have to resample it.

Then as you are inputting your data stream, you will just append a new array with your 'next' data stream value and another array with the 'next' preloaded array value. This will cause both arrays to contain the same amount of data for the display. Finally, send both arrays to the display graph.

I don't have DAQ installed on this machine or I would post an example.

David

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.