08-21-2019 04:07 AM
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...
Solved! Go to Solution.
08-21-2019 04:14 AM
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…
08-21-2019 04:20 AM
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
08-21-2019 04:54 AM
08-21-2019 04:57 AM
The idea is to use Python in the cRIO, with the Reportlab package.
08-21-2019 05:01 AM - edited 08-21-2019 05:03 AM
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…)
08-21-2019 06:51 AM
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.
08-21-2019 08:07 AM
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.
08-21-2019 08:22 AM
@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
08-21-2019 08:56 AM
@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.