LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data source for CTL to VI

Disclaimer: I'm new to Labview.

 

I've got a VI that pulls data from an unknown location (possibly a database) to configure itself depending on the circumstance. If it is pulling from a database, is it the CTL file that determines where the data is coming from? If so, how do I find where it's pulling it's data from so that it can be changed?

 

I'm trying to change the default data that auto populates because our hardware requirements have changed.

 

Below is the VI and the CTL file snip.

 

Thanks!

0 Kudos
Message 1 of 6
(2,296 Views)

Hi Jay,

 


@JayWW wrote:

Disclaimer: I'm new to Labview.

Below is the VI and the CTL file snip.


Please read the LabVIEW help on "snippets" to learn the difference between plain images and real snippets…

(And do those Trainings as offered in the header of the LabVIEW board. NI even offers all courses for free until end of April!)

 


@JayWW wrote:

I've got a VI that pulls data from an unknown location (possibly a database) to configure itself depending on the circumstance. If it is pulling from a database, is it the CTL file that determines where the data is coming from? If so, how do find where it's pulling it's data from so that it can be changed?

I'm trying to change the default data that auto populates because our hardware requirements have changed.


This VI will read data from a GPIB device as configured in this "Supply settings" typedefined cluster.

This cluster contains several elements, which define the parameters of the GPIB communication, like GPIB address and power supply settings.

When you want to change the "where it's pulling data from" part, then you have to change the GPIB address…

 

(The underlined words can be found in the LabVIEW help: you surely want to learn LabVIEW and read its help!?)

Best regards,
GerdW


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

Hi Gerd,

 

   So am I correct in assuming the configuration takes place in the CTL file? The GPIB devices are unconfigured (other than their address) prior to getting to this part of the code. It's a generic form that changes based on the GPIB address (I believe). 

 

It's to configure two different power supplies that have different voltage and current levels. They are currently being configured incorrectly which causes the program to hang.

 

Thanks,

Jay

0 Kudos
Message 3 of 6
(2,271 Views)

Hi Jay,

 


@JayWW wrote:

So am I correct in assuming the configuration takes place in the CTL file?


No, wrong.

The CTL file just defines the datatype of the control. (Strict typedefinitions also define the look/style of the control on the frontpanel.) But it does not define the value of the control!

 


@JayWW wrote:

It's to configure two different power supplies that have different voltage and current levels. They are currently be configured incorrectly which causes the program to hang.

Then you need to set correct values!

I guess the shown VI will be called from a main VI: you need to wire correct data to the "Supply settings" input of this VI!

Best regards,
GerdW


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

When the VI gets called in the program, the window pops up with values already loaded. I'm trying to determine where the values are coming from, because in the VI the default values are zero prior to running the program.

 

So the VI is being sent values based on the GPIB address. These new power supplies need different values in order to be configured properly, but I can't find where the values are being stored. They aren't being entered by the user.

 

 

0 Kudos
Message 5 of 6
(2,260 Views)

Hi Jay,

 


@JayWW wrote:

When the VI gets called in the program, the window pops up with values already loaded. I'm trying to determine where the values are coming from, because in the VI the default values are zero prior to running the program.


So there seem to be a data source in the calling VI that provides those "Supply settings" parameters. You need to find the place where the VI is called!

Hints:

  1. Open the project containing the calling VI and the VI shown in your image. Right-click the "VI shown" in the project tree and select "Find callers".
  2. Open the calling VI, then use the search (Ctrl-F) to search for all instances of the "VI shown"…
  3. There are even more ways to find resources in LabVIEW VIs…

 

(It really would help you when you start with LabVIEW tutorials before trying to analyze other peoples source code.)

Best regards,
GerdW


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