LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string indicator is not proplerly updating boolean action

Hello there,

 

in the below VI i am trying to send different CAN messages using boolean,

problem is if i want to send the different messages i am not receiving the response for the current sent message, instead i am receiving the response for previously sent message ,but if i press boolean for 3-4 times i am receiving the current update. 

could anyone please guide me .

 

Anil8899_0-1634552892893.png

 

 

 

 

 

0 Kudos
Message 1 of 7
(1,943 Views)

I can't open your code, but the description is 99.7% a Race Condition.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 7
(1,911 Views)

The VI has dependencies that you didn't include so can't run it, and the problem might exist in those dependencies anyway.

 

But I will say that if your Boolean is False, then your loop is gonna run at a million miles an hour and it's gonna hog CPU resources.

Redhawk

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 3 of 7
(1,896 Views)

Anil8899_0-1634709561803.png

could you please check now and help me ..

 

0 Kudos
Message 4 of 7
(1,839 Views)

Hi Anil,

 

If you want to Execute True state on demand, you can better prefer Event based State Machine Architecture, In  that case all Local Variable and  Race Conditions can be avoided.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 7
(1,828 Views)

Hello,

 

please find the attached VI , still i am receiving the response for the previous message only.

please guide me i am not able to resolve .

 

 

 

thanks for your responses ...

 

0 Kudos
Message 6 of 7
(1,788 Views)

Please use Event based state machine architecture and shift register to hold string data.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 7
(1,773 Views)