03-01-2020 03:02 AM
03-01-2020 03:05 AM - edited 03-01-2020 03:07 AM
the solved attach file
03-01-2020 10:56 AM - edited 03-01-2020 10:58 AM
Hi Laian,
you did not use many of my suggestions.
Your VI could also look like this:
(Just slightly "better", but still not "good"…)
Still open questions:
You read twice from your microcontroller, but only write once: does your µC send data without request? Usually you should pair one read with one write operation…
What's the point of converting one read result into a cluster and the second result into an U8 array? (You know you can display the string in "hex display mode", so no need for a conversion to U8 just for fancy display!?)
03-01-2020 10:40 PM - edited 03-01-2020 10:41 PM
Hi Dear Mr GerdW
yes you are right the third display and visa read function is useless. It was just for my primarily test and now I have deleted it. yes you have made the whole design more efficient and useful. well done 🙂
Thank you very much
Best Regards
03-10-2020 01:16 AM - edited 03-10-2020 01:25 AM
Hi Dear Mr GerdW
I have done the same as you said but it didnt work correctly for my 322 variables. really confused me.(it works correctly for reading and writing 9 long variables)
first I tested my micro controller code with a hyper terminal and it works correctly without any problem I mean I can read and write 752 bytes correctly and it shows my micro code works correctly but I dont know what is the problem with Labview. it sometimes writes strange data on my cluster. some times it read less than 752 bytes and stops working. when I test it with a constant cluster to write on my cluster it works just one time correctly and suddenly every thing goes wrong with strange data showing on my cluster. again I say I tested my micro code with hyper terminal software ten times which works correctly. please help me. thanks
03-10-2020 01:19 AM - edited 03-10-2020 01:28 AM
Hi Laian,
please downconvert your VI to LV2017 and attach again. (Edit menu -> save for previous)
Edit: It doesn't make sense to post a question with a VI attached and then deleting the whole message after you already got an answer…
03-10-2020 01:28 AM - edited 03-10-2020 01:40 AM
Hi Mr GerdW
I have done the same as you said. but it didnt work correctly for my 322 variables.(it works correctly just for 9 long variables)
I have tested my micro code with a hyper terminal software and it works correctly. I mean I can write and read 752 bytes without any problem and my micro code is correct. but with Labview sometimes it read less than 752 bytes and stops working sometimes it shows strange value on my cluster(for example when I try to write on my cluster with a constant cluster).
thanks alot
Edit:
* sorry when I wanted to add the attachment I deleted my post mistakenly
* let me know if the file is ok for 2017 version
03-10-2020 01:29 AM
Hi Laian,
@Laian wrote:
Hi Mr GerdW
I saved it for 2017 version. was it ok?
I don't know until you attach that VI again!
03-10-2020 01:54 AM - edited 03-10-2020 01:54 AM
Hi Laian,
again you deleted a message after posting a question and attaching your VI…
The question was something like "sometimes LabVIEW doesn't read the whole 752 byte long message, but less bytes": this is BECAUSE YOU have it programmed this way!
Read the help for VISAConfigureSerialPort - and wire ALL inputs correctly! As you are trying to transfer "binary" data you need to switch OFF the TermChar!
03-10-2020 01:54 AM - edited 03-10-2020 01:57 AM
There is a problem they delete my post
its not me
I dont know why! maybe because I have attached it as a zip file!!