LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making Changes on .ctl file

Hello Dear All,

 

To obtain data from thermocouples, I am using MEASURPoint system for data logger. For this, we have a control file that I have to change IP address and channel numbers, as can be seen from attached picture.

 

Whatever I try, I could not change IP address and channel numbers. I am adding both .ctl file for MEASURPoint and picture from it.

 

would you kindly describe me how I can change it?

 

Sincerely.

Download All
0 Kudos
Message 1 of 7
(396 Views)

You have to explain better what you want to do. Maybe the problem as well.

 

How do you want to change those controls: manually from the diagram, all together or one element? Or do you mean permanently change them (change and make them default)?

 

When I open the control, I can change the value...

0 Kudos
Message 2 of 7
(387 Views)

Boy, this is a tough one because you are not explaining it very well, but I have a feeling that if you could explain it well, you wouldn't need our help.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 7
(379 Views)

Hello Dear  CARYA,

 

I have just wanted to change IP address and TC number channel to communicate with my MEASURPoint box (data logger). I can also change values but when I save it and close/open again, all the parameters will be changed to its previous values.

 

 

0 Kudos
Message 4 of 7
(374 Views)

Hi Ex,

 


@Exchanging7878 wrote:

I have just wanted to change IP address and TC number channel to communicate with my MEASURPoint box (data logger). I can also change values but when I save it and close/open again, all the parameters will be changed to its previous values.


There are two problems:

  1. Your observation most probably comes from the fact, that the previous developer set some default values in those controls. While you can change the current value at edit time the next time you load the CTL again it will revert back to the saved default values…
  2. You should NOT set values in a type definition!
    As you can see from your image that CTL is a type definition and so it only define the datatype, but not the data value(s)!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(351 Views)

Hi,

 

Your .ctl file is a Type Definition, so it defines a type, not data.

There may be somewhere else in your code or file structure where it stores the actual parameters data.

It is most likely in an .ini, .txt or .csv file.

It can also be simply a block diagram constant or a control / global variable with default values...

If it is a control or global variable, make sure you right-click your control / global variable control > Data Operation > Make Current Value Default, to make the new values persistent.

 

Regards,

Raphaël.

0 Kudos
Message 6 of 7
(347 Views)

@Exchanging7878 wrote:

I have just wanted to change IP address and TC number channel to communicate with my MEASURPoint box (data logger). I can also change values but when I save it and close/open again, all the parameters will be changed to its previous values.


I think you could use an explanation from another source...

 

LabVIEW never stores data changes. This would be horrible if a graph gathered 50 BM of data while running... Besides that, data is often filled while running, and while running VIs are typically not saved.

 

To make data in control persist (e.g. save\load) you should change the default value, and save the VI. But this is an editing action, not something a user of the running VI can or should do.

 

To make a value in a control persist, you have to make it behave that way. So, your program should read the value, save it to something at selected times (on change, a times, on close, etc). Then, when restarting your VI, it should load the data from the source (a database or file of any sorts: .ini, cvs, json, xml) and write the value(s) to the control(s).

 

There are many, many ways to do this. There are even some (rudimentary) constructs in LabVIEW that try to do this.

 

If you're a beginner and simply add this 'persistence' functionality to your main VI, you'll probably make a big mess. You really have to make some low level VIs (subVIs) so your main doesn't clutter. Probably easier said that done, but we're here to help. It's not that this particular problem is hard, but levelling up application design is...

0 Kudos
Message 7 of 7
(321 Views)