04-01-2020 10:01 AM
Post all of your code. Right now you're showing us a picture of your steering wheel and asking us why your car pulls to the left.
You didn't do anything "wrong" when making that notifier... but it's just a couple of functions. Outside of context it's unfortunately meaningless for helping us to help you.
04-01-2020 10:02 AM
actually i uploaded a picture in my last message i dont know why it didnt sent
now i attached a picture of my code.
this is how i want to communicate with another vi .
I will try your example
Thank you very much
04-01-2020 10:06 AM
Still not enough of your code to be of any help.
04-01-2020 10:17 AM - edited 04-01-2020 10:20 AM
Now you gave us a picture of the outside of your car and are asking why it pulls to the left. Upload your *code* not a *picture of code* and we can actually see what's happening.
Upload the thing that ends in .vi, not .png.
04-01-2020 10:35 AM
Judging from the dialog so far, I believe your experience with notifiers to be limited to none. Are you even sure you should be using a notifier? Are you okay with possibly dropping data if you don't service the notifier before new data arrives?
If you need ALL the data, use a queue. If you don't care about potentially missing data (e.g., for display purposes only) use a notifier.
04-01-2020 10:54 AM
@ehsan75 wrote:
this is how i want to communicate with another vi .
Then what is that VI? Context is EXTREMELY important here. I question your need for a Notifier. You might need a simple Global Variable or you might need a Queue. But I cannot state which way to go without more context.
At the very least, using the code in your image, you need to obtain your Notifier reference before your loop and you need to release the Notifier after your loop.
04-02-2020 09:44 AM - edited 04-02-2020 09:46 AM
hi
first i appreciate you and others for answering my problems.
and you were right. so i uploaded the vi files.
here what i want to do:
i want receive data from serial port then separate them then transfer each separated data to another vi and process it.my data is continuous like temperature and it must transfer every second.
This file is what i did. if you have better idea to do this please tell me. it doesn't matter how. and i'll be appreciate if you upload to me a vi source.
Thank you
04-02-2020 09:55 AM
Three are no toplevel loops in any of your VIs. Are you using the "continuous run" function? That's not the right way.
04-02-2020 10:39 AM
@ehsan75 wrote:
i want receive data from serial port then separate them then transfer each separated data to another vi and process it.my data is continuous like temperature and it must transfer every second.
Sounds more like you should be using a Producer/Consumer, which uses Queues so you can process all of the data. And if you are worried about timing at all, I would leave the serial communications in its own loop. Use a consumer loop to process the data and send it where it is needed.
The number you are writing through the serial port should probably be a simple Global Variable.
But, as altenbach was trying to get to, I am seeing a complete lack or organization in your code. Maybe a diagram showing the different modules/loops you want and how they should interact would help here. Design before you code.
04-02-2020 01:57 PM - edited 04-02-2020 01:58 PM
i tried producer/consumer as the link you said. it didn't send data to my other vi do you have any example on .vi?