LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bidirectional connection between array and controls

Solved!
Go to solution
Hi GerdW & Cbutcher & all membesr I have done it the same as Mr GerdW said. and I have attached it for every one who maybe need it later. Thanks you all great kind members 🙂
0 Kudos
Message 21 of 40
(1,716 Views)

the solved attach file

0 Kudos
Message 22 of 40
(1,713 Views)

Hi Laian,

 

you did not use many of my suggestions.

 

Your VI could also look like this:

check.png

(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!?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 23 of 40
(1,692 Views)

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

0 Kudos
Message 24 of 40
(1,673 Views)

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 

Download All
0 Kudos
Message 25 of 40
(1,582 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 26 of 40
(1,647 Views)

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

Download All
0 Kudos
Message 27 of 40
(1,593 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 28 of 40
(1,639 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 29 of 40
(1,621 Views)

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!!

0 Kudos
Message 30 of 40
(1,620 Views)