LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript print command????

Help.

I need this command or equivalent work around.  For instance, can I programatically print mathscript figure windows using LV picture programming?

Thanks
LV 8.6 on Windoze XP
0 Kudos
Message 1 of 15
(4,979 Views)
Hi Clueless,

what do you wanna print?
The front panel or the block diagram?

-You can set vis to print the front panel when finishing execution.
-You can print the front panel by calling a method node.
-You can save the front panel to PNG file (or other graphics format).
-You can use the excellent CodeCaptureTool.

Does it answer your question?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 15
(4,971 Views)
I'm using LV 8.5.

I want to print the figure window generated when I have a mathscript window that has for instance the following lintw

figure
plot(fft(eye(37)))

I would like to print the picture programatically in "mathscript".  But alas, there is no print command as in M#TL#B.  So, is there a way to get a reference to the graphics window the pops up in response to a mathscript "figure" function.  I can print the window using pointNclickery but have not found a way to automate this task.

Thanks,

Howard
LV 8.6 on Windoze XP
0 Kudos
Message 3 of 15
(4,968 Views)
Hi Clueless,

you're talking about the "Mathscript window" you can call via tools menu?

I don't see any option to print this programmatically as this tool is mainly intended for "trying-out before programmming".
When you finish your testing you can save the mathscript program to a file and use it in a "real" vi. Here you can use the options told above for printing (and you can even make nicer plots)...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 15
(4,962 Views)

No,  I'm talking about a mathscript window (Structure?) that's inside a LV picture program.  You don't have to use the mathscript IDE to generate a figure window.

LV 8.6 on Windoze XP
0 Kudos
Message 5 of 15
(4,959 Views)
Hi Clueless,

so you're talking about the "mathscript node" Smiley Wink

IMHO:
The mathscript "figure" command is creating the window to show the plot. You cannot (easily?) get the window reference as this is maintained by the mathscript node. It's like not getting intermediate results when mathscript is calculating numbers - it's all inside that node...
To have a reference for printing you should create your own windows or use the front panel of the vi running the mathscript node!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 15
(4,956 Views)


"To have a reference for printing you should create your own windows or use the front panel of the vi running the mathscript node!"

Are  you saying that I can plot mathscript "node"  figures onto a LV front panel?  How?

How do I create my own windows, and can I pass a reference to them into a mathscript node that I can then plot stuff into??

Thanks
LV 8.6 on Windoze XP
0 Kudos
Message 7 of 15
(4,953 Views)
Hi clueless,

I haven't worked with MatLab for long, so I only know some basics:
Use "a=fft(eye(37))" instead of "plot(fft(eye(37)))".
Set a as output of the mathscript node, it will be some kind of array (2d probably).
Wire this to a xy-graph (split the array into x- and y-array, build cluster as in context help for xy-graph).
Now you have a xy-plot on your front panel and you may print the front panel as you like...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 15
(4,949 Views)
Has anyone got an answer?

Why is the picture plots - "plot multixy such a travesty?  The defaults are ugly.  Why doesn't the default look as good as the matlab style plot that's easy as typing

figure
plot(x,y1,x-)
hold on
plot(x,y2,o-)

title('mytitle')
xlabel('myxlabel')
ylabel('myylabel')
legend('y1','y2')

I've screwed around with it for hours and can't get anything even close to publication quality.



LV 8.6 on Windoze XP
0 Kudos
Message 9 of 15
(4,911 Views)
Hi Clueless,

it's maybe because LabView is a graphical programming language whereas MatLab is text based?

All of those options can be set by property nodes or (at development time) in the properties dialog of the plot...

And you already mix up names: do you use "picture indicator" or "xy-graphs" or "waveform-graphs" or "waveform-charts"?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 15
(4,894 Views)