LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Image and Auto Scaling of Wave Form Graphs

Hi All,

I have a VI that I have created that takes as input amplitude, frequency, and offset then plots some points on a waveform graph (input graph) does some functional calculation and plots these results in a waveform graph (output). The VI will then use the Get Panel Image Method off of Invoke Node(VI class) and grab an image of the front panel the only visible indicators on the front panel are my two waveform graphs. This works great when I use this VI as stand alone. As soon as I create a Shared DLL I loose the autoscaling on the waveform graph.

My VI is built using a Flat Sequence Structurre that in the first frame takes care of building the data and putting it into the waveform graphs and then in my next sequence frame I use the Get Panel Image method of Invoke Node(VI class) to get an image of the front panel and then write the JPEG to the file system.

Is there a special way to get the Auto Scaling to take effect in a shared dll?

Any help would be greatly appreciated.

Thanks,

Jim
0 Kudos
Message 1 of 4
(3,097 Views)
Hello Jim,

I was hoping that I could get a little more information about your setup. First, what version of LabVIEW are you running? I am finding reports of other people having a similar problem with older versions of LabVIEW. Also, what other program is calling your dll? Are you displaying the graph image in this other program? I wanted to see how you are passing the graph. Are you trying to pass the image of the graph to the calling program or the actual graph? Finally, I wanted to make sure that you are creating a shared dll and not an executable.
It may help for you to attach a screenshot of your program so that I can recreate it exactly. I would also like you to try and set autoscaling for the graph with a property node. This can be done by creating a property node for the graph and selecting Scale Fit. Wire a constant 2 to this property so that it will continuously scale the graph.

Thanks,
Caroline
National Instruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 2 of 4
(3,043 Views)
Hi Caroline,

Here is a bit more info on the background of the application. We are using LV 7.1 and invoking the shared dll with a .Net web application. The aspx page takes as input the Amplitude, Frequency and Offset values. Calls the shared dll with these values. The dll will take these values put in the input values into an "input" waveform graph do some calculations with the inputs and create the output for the "output" waveform graph. After this I have the VI take a image snapshot of the front panel image which is just the two waveform graphs. It writes this image to the drive and then I pass back to the .net aspx page the name of the file and the .net application pulls in the appropriate image for display.

I have included in my latest version with your requested changes with the property node for scale fit and it is scaling but I have to run the page twice. The first time the image is correct as far as the graph but the scaling is the scaling of the previous time the page was run. If I run the page with the same values the next time the scaling is perfect. Any ideas?

I've attached my VI and subVI along with my aspx page and the shared dll with the bld script. Let me know if you need any further information.

Thanks,

Jim
0 Kudos
Message 3 of 4
(3,036 Views)
Hi Jim,

I have taken a look at the files you sent me. My first step was to try and see if the problem was in the dll that takes the snapshot. I called the dll from another LabVIEW program by using the Call Library Function Node. When I ran this program, I was unable to recreate your issue. The graph would automatically scale as I wanted it to each time I ran the program. This leads me to believe that there is an issue in the calling program and not the LabVIEW dll. In order to find this issue I would appreciate it if you could write a step by step process of how you put your project together to call the dll. I want to make sure that every step I go through here is exactly the same. This way we can pinpoint where the issue is coming from. I would also like to know if you see the same behavior when you call the dll from another LabVIEW since I did not see it.

Regards,
Caroline
National Instruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 4 of 4
(3,001 Views)