LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an image of a chart from LabVIEW RT (*.rtexe)

Solved!
Go to solution

Hi all,

 

Until now, I have a LabVIEW PC HMI connected to a cRIO. Briefly, the cRIO acquires some signals and the HMI shows them to the user via some waveform charts. The user is also able to generate some reports in PDF with screenshots of the charts.

 

Now, we want the cRIO to become independent of the IHM, that is, to automatically save an screenshot of the charts if some given conditions are met.

 

I know that when the system is standalone (compiled rtexe working on its own), the front panels are not loaded into the cRIO, so I will get the famous 1055 error code when I try to get an image from a front panel element.

 

I thought that checking the 'Enable Debugging' option in the build specification should work, since it saves the front panels in the cRIO when we do that. However, I get the 1055 error.

 

So the question is, does anybody know a way to get an screenshot of a LabVIEW waveform chart in the cRIO? (I don't care the format of the picture)

 

I'm afraid the response is that that's simply not possible, but I consider that a great limitations regarding the automatization of systems...

 

 

0 Kudos
Message 1 of 10
(2,781 Views)

Hi i.,

 

store the chart data in a data file.

Transfer the data file to a PC.

Recreate the chart image using some LabVIEW VI running on the PC.

 

As the cRIO runs headless you need a PC anyway to examine any data created/stored on your cRIO…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,773 Views)

Hi,

 

thanks for the response, but that's not a solutions.

 

Actually, as I said, a PDF report needs to be generated with the picture (I know how to do that), because the cRIO then sends the report by email to the customer. So no, I would not need a PC to examine the data stored in the cRIO, it will always run headless.

 

Regards

0 Kudos
Message 3 of 10
(2,767 Views)

Hi i.,

 

which software do you use to create the PDF on your cRIO?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(2,749 Views)

The idea is to use Python in the cRIO, with the Reportlab package.

0 Kudos
Message 5 of 10
(2,747 Views)

Hi i.,

 

The idea is to use Python in the cRIO

What about one more Python package to create an image from your measurement data?

 

(Another option would be to draw your "chart" image n your own using the 2DPicture drawing functions and then save the resulting image into a PNG file. It's quite fun to do all the axis drawing stuff on your own…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(2,744 Views)

The main difficulty is that I need to use different (complex) types of graphs, including stuff like logarithmic axes, which are not easy to 'build' manually. Even worse, I already have all the graphs ready in LabVIEW, so I would like to avoid re-designing all the graphs.

 

But thanks, I'll have a look.

0 Kudos
Message 7 of 10
(2,720 Views)

The problem is that the Get Image from FP or Get Image from Control methods in VI server are stubbed out in the LabVIEW real-time runtime system in which your executable is running. This is a conscious decision by the LabVIEW developer team as they want to minimize the runtime system as much as possible and it makes no sense to carry code in the runtime system that can't normally be used. Since VIs on a real-time system generally run headless (yes I know there are one or two real-time targets that support some minimalistic monitor output), it doesn't normally make sense to include this method in the according runtime system. It would require a lot of other dependencies to be included as well and require most likely a significant redesign of some parts of the real-time system that so far simply assumed that they don't have to worry about UI update being able to mess with it.

 

 

Rolf Kalbermatter
My Blog
Message 8 of 10
(2,703 Views)

@rolfk wrote:

...(yes I know there are one or two real-time targets that support some minimalistic monitor output), ...

 


I do not remember the model number but there are some industrial controllers that offer a GUI.

 

So you have to choose "the red pill or the blue pill" invest in the hardware or invest in the code.

 

If you only have one cRIO to make this happen, the hardware may be the right choice. If you have many, then software will be the cheaper option.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 10
(2,693 Views)
Solution
Accepted by topic author i.ayestaran

@Ben  a écrit :

@rolfk wrote:

...(yes I know there are one or two real-time targets that support some minimalistic monitor output), ...

So you have to choose "the red pill or the blue pill" invest in the hardware or invest in the code.

 

Ben


Wow!!

 

So, after reading your responses, you gave me an idea. I have a cRIO9030, which supports monitor output by its MiniDisplay port, so I wondered if the getImage function would work when the monitor output is activated.

 

So I activated the Embedded UI option from MAX (I did not connect anything to the port), I restarted the cRIO....... AND YES!!!! It works!

The conclusion is that  the GetImage Invoke Node works when the monitor output is active.

 

Thank you very much to all of you.

0 Kudos
Message 10 of 10
(2,685 Views)