02-28-2020 04:43 AM
Hi dear all members
I want to get a bunch of data (about 300 long integers) from visa serial read function and display them on the front panel and then change some of the values and again send them back with write visa function. For this I made 300 control displays and connect them to an array with array build function and so the visa functions are connected to the array.I need to point out that as I have to positioned the values in different places in Vi front panel so I couldn't do it all just by one unique array which the elements are in specific cells and not be separated and located differently.
But now for getting values from visa serial and sending them from array to my 300 control displays I have to create local variables from each 300 control displays and again connect them to my array which is really time-consuming. Is there any suggestions to help me get rid of this I mean is it possible to make any kind of bidirectional connection between controls and related elements in the array which any change to any of them causes change to the other simultaneously?
Thanks in advance
Solved! Go to Solution.
02-28-2020 06:23 AM
Hi Laian,
creating and placing 300 individual controls on your frontpanel sounds wrong…
@Laian wrote:
I want to get a bunch of data (about 300 long integers) from visa serial read function
Are those 300 values related to each other in any way?
Are there some smaller groups of values, which could be collected by using arrays or clusters?
@Laian wrote:
Is there any suggestions to help me get rid of this I mean is it possible to make any kind of bidirectional connection between controls and related elements in the array which any change to any of them causes change to the other simultaneously?
Use clusters to group related values.
Use arrays to handle values of the same kind.
Minimize the number of frontpanel elements before starting any further improvements…
You could use control references to set values.
You could use an event structure to handle user inputs on your controls.
02-28-2020 06:26 AM
How about using Single array to display all Integer data?
Please do share the code for better Understanding.
02-28-2020 07:03 AM
Hi thanks for ur answre
I have a code in a micro chip and I want to know that my code working well so with serial port I send all variables data flags to LabVIEW and then change the values with LabVIEW and again send back to micro for another cycle
And I have 300 hundred variables
I want to see them sometimes as boolian value sometimes as number to see how my code works
02-28-2020 07:12 AM
Hi Laian,
@Laian wrote:
I want to see them sometimes as boolian value sometimes as number to see how my code works
So you could group those values! Atleast you could separate "numbers" from booleans…
Most often there are also related values(like parameters of a PID controller), which could be grouped in clusters…
Again: minimize the number of frontpanel elements!
02-28-2020 07:36 AM
Thanks again
So if I use cluster then how can I send data from visa read/write functions to cluster?
Again I need cluster to array function ☹️
02-28-2020 07:39 AM - edited 02-28-2020 07:42 AM
Hi
array force me to set values in an array indicator and I can't move cells to any locations on the front panel
@PalanivelThiruvenkadam wrote:
How about using Single array to display all Integer data?
Please do share the code for better Understanding.
02-28-2020 07:43 AM
Hi Laian,
@Laian wrote:
So if I use cluster then how can I send data from visa read/write functions to cluster?
Again I need cluster to array function ☹️
You don't need the ClusterToArray function to read/write data from/to a cluster. You need (Un)Bundle(ByName)…
02-28-2020 08:03 AM
Thanks I will try it
02-28-2020 11:02 AM
All I can say is I would not want to work with any front panel that had 300 controls. There has got to be better ways of handling your data. Working with a front panel with 300 controls would be a nightmare, both for the programmer and the user.