10-18-2021 05:33 AM
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 .
10-18-2021 06:27 AM
I can't open your code, but the description is 99.7% a Race Condition.
10-18-2021 07:10 AM
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.
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.
10-20-2021 01:00 AM
could you please check now and help me ..
10-20-2021 03:50 AM
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.
10-25-2021 05:28 AM
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 ...
10-25-2021 08:19 AM
Please use Event based state machine architecture and shift register to hold string data.