LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array initialization problem

Solved!
Go to solution

Hello,

 

I want to initialize array "Fitting Parameter Initialization" once VI starts (using Value Signaling prioperty).

Doesn't work. Upon VI start "Fitting Parameter Initialization" keep its old value.

 

Thanks in adavnce 

 

 

array_initialization_problem.JPG

0 Kudos
Message 1 of 12
(3,959 Views)
Solution
Accepted by topic author Pavel_47

Hi Pavel,

 

your property nodes have their label hidden - this is extremely distracting. Think about "code documentation"…

 

Why do you need a "value signalling" property? Why not use a simple local variable?

Best regards,
GerdW


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

Indeed, with local variable it works.

Thanks.

 

P.S. BTW why with signaling property it didn't

array_initialization_problem (1).JPG

0 Kudos
Message 3 of 12
(3,939 Views)

Why you are using Value Signaling Property. You can simply use Value property or local variable of the array.

Capture.PNG

Happy to Wire
0 Kudos
Message 4 of 12
(3,934 Views)

sankar06 a écrit :

Why you are using Value Signaling Property. You can simply use Value property or local variable of the array.

 


Frankly speaking I have no consistent answer to your question.

For some issue in the past only "Value Signalling" property could do the job (Local variable failed).

I don't remember what setup I used at that moment, but since I privilege "Value Signaling" for assigned values to controls.

 

But anyway, in this particular case ... why "Value Signaling" doesn't work ?

Thanks

0 Kudos
Message 5 of 12
(3,925 Views)

Hi Pavel 

Actualy it working fine in my test code. I dnt know the reason why it is not working in your VI. The Value signaling property is used to generate the value change event programticaly.

Happy to Wire
0 Kudos
Message 6 of 12
(3,919 Views)

Can you, please, put your image.

Thanks.

0 Kudos
Message 7 of 12
(3,914 Views)

Capture.PNG

Happy to Wire
Message 8 of 12
(3,904 Views)

Ok,

It seems that it works due to "error chain", that introduces continuity of events, e.g. first array is initialized, then while loop starts.

Without "error chain" it will not work, isn't it ?

0 Kudos
Message 9 of 12
(3,893 Views)

Hi Pavel,

 

without error chain it may work or it may fail - it's a typical race condition!

 

By now you should have learned to THINK DATAFLOW!

Best regards,
GerdW


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