LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to output an ASCII file to a waveform graph.

The output ASCII file looks something like this:
SP1;PU;PA687,1402;PU;PA687,1402;PD;PA687,4282;PD;PA687,7162;PU;PA1625,7162;PD;PA1625,4282;PD;PA1625,1402;PU;PA2562,1402;PD;PA2562,4282;PD;PA2562,7162;PU;PA3500,7162;PD;PA3500,4282;PD;PA3500,1402;PU;PA4437,1402;PD;PA4437,4282;PD;PA4437,7162;PU;PA5375,7162;PD;PA5375,4282;PD;PA5375,1402;PU;PA6312,1402;PD;PA6312,4282;PD;PA6312,7162;PU;PA7250,7162;PD;PA7250,4282;PD;PA7250,1402;PU;PA8187,1402;PD;PA8187,4282;PD;PA8187,7162;PU;PA9125,7162;PD;PA9125,4282;PD;PA9125,1402;PU;PA10062,1402;PD;PA10062,4282;PD;PA10062,7162;PU;PA10062,7162;PD;PA5375,7162;PD;PA687,7162;PU;PA687,6586;PD;PA5375,6586;PD;PA10062,6586;PU;PA10062,6010;PD;PA5375,6010;PD;PA687,6010;PU;PA687,5434;PD;PA5375,5434
;PD;PA10062,5434;PU;PA10062,4858;PD;PA5375,4858;PD;PA687,4858;PU;PA687,4282;PD;PA5375,4282;PD;PA10062,4282;PU;PA10062,3706;PD;PA5375,3706;PD;PA687,3706;PU;PA687,3130;PD;PA5375,3130;PD;PA10062,3130;PU;PA10062,2554;PD;PA5375,2554;PD;PA687,2554;PU;PA687,1978;PD;PA5375,1978;PD;PA10062,1978;PU;PA10062,1402;PD;PA5375,1402;PD;PA6

Any suggestions?
0 Kudos
Message 1 of 6
(3,142 Views)
I don't understand the question. What are the numbers that you are wanting to plot in the ASCII file? What is the source of the ASCII file? What is the format of the data in the data file? Is it in an x,y format or a vector coordinate format? With a little more information I expect that this will be rather easy.

John
Message 2 of 6
(3,142 Views)
Thanks for your help. The questions that you asked helped me dig in a little deeper. It turns out that the format is HPGL (Hewlett-Packard Graphics Language). It's basically a file type that can be read in Word.

Thanks again!
0 Kudos
Message 3 of 6
(3,142 Views)
That's HPGL, a language used for plotters.

Think in those terms and you can do it.

You need an X-Y graph, not a waveform graph.

split the text at the semicolons first - they delimit a single command.

The first two characters of a command string are the command, the rest are the data for that command:

SP means select pen (choose color)

PU means pen up (don't draw a line to the next coordinate).

PD means pen down (do draw a line to the next coordinate).

PA gives an X-Y coordinate to move the pen to. That will / won't draw a line, depending on whether the pen is currently down or up.

That should get you going.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 4 of 6
(3,142 Views)
Thanks for the help!!!
0 Kudos
Message 5 of 6
(3,142 Views)
Hello

Take a look at this link. They have an "hpgl plotter" converter that can be useful.
http://hamiltondesign-consulting.com/labuseful.html

Hope this helps.

Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 6 of 6
(3,142 Views)