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
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.
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
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.
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
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
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