06-10-2022 06:39 AM - edited 06-10-2022 06:43 AM
Now your are really give more information that we can use.
These information should you have given from the start.
So you have a STM program, and you have talk to your program using putty.
Then look at the examples that come with LabVIEW.
Do a little google search.
@Crossrulz recently did a presentation that you may find helpful. VIWeek 2020/Proper way to communicate over serial
When you have made your first vi, then come back. Show us the vi, tell us what you need to send, and what you expect to receive.
06-10-2022 07:18 AM
thank you so much.. i will watch the video and soon i will come with new vi
06-20-2022 04:57 AM - edited 06-20-2022 04:58 AM
Hello everyone,
Im back with my VI. now with this VI i can able to send command and receive the values which i want but im facing problem that is----
if i send my 1st command then it is reading half output then i need to keep pressing send button to get full output then again same for next command. moreover sometimes if i send my 2nd command then it is displaying previous output then again i have to press send button multiple times for the output.
can someone tell me what is the problem??
the vi is attached
Thank you in advance
06-20-2022 05:19 AM - edited 06-20-2022 05:21 AM
What is your setting for reading number of bytes (the nameless U32 wired into VISA Read)?
Most likely you have that number set too low and/or are reading the response too fast.
After writing your command you would probably need at least a couple of ms delay before reading the response and if the response is for example 20 bytes, but you read only 10, then you get half a message.
Also having an event structure inside a case structure that only triggers occasionally is not exactly ideal.
06-20-2022 09:02 AM
A couple things here...
06-20-2022 09:23 AM - edited 06-20-2022 09:29 AM
hi,
Thank you,
Already followed that video and made some changes in write sub vi as per i want but facing same issue that is-------
1. getting half output.(even i tried to increase read byte count.)
2 . Need to send same command multiple times to get output. do i need any delay in between or im using visa´s in wrong way ?
Thank you
06-20-2022 09:42 AM
Hi,
thank you,
I already went through that video and changed some vi and sub vi as i want it but the problem remains same----
1. Getting half output (even increased byte count in read visa ).
2. Need to send one command multiple times after one command then only im getting the output. (do i need a delay i between read and write visa).
thank you in advance
06-20-2022 10:16 AM
Neither of the VI's you posted is what you have pictured above?
06-20-2022 10:28 AM - edited 06-20-2022 10:29 AM
yes i changed the VI by looking at the @crossrulz`s video but the result is same. Can you please tell me what is the problem?
06-20-2022 10:30 AM
How are you sending data FROM the microcontroller?
Do you send a \n or \r at the end of your data string?