I am trying to use an array of booleans to display the status of a prototype circuit connected via the RS232 port. I am expecting two binary 8 bit Bytes from the RS232 port, the frist byte an address and the second byte actuall 8 bit data. I have an 8 x 6 array of boolean indicators, how can I use the address byte to correctly update the array with the correct data? Each row of indicators has its correspoding 8 bit address. Thanks.
Actually I was not intending to just display the address and the data, I would like a way for labview to automatically "decode" the address and update the correct indicator on the array. There is nothing too fancy about the way I addressed the data. Row one has address "00000001". Which I would then wait for the data to come in, seperate the byte into bits and display where it was a one or zero. I also don't have a fancy way of "decoding" the data. I take the order of the data coming in and display the correct indicator according to the address. "00000001" for row one, "00000010" for row two, "00000011" for row three and so on. Thanks for the help. I have included the vi of the array I created.
You need to split the returned string into two parts. The first part is wired to the index input of the Replace Array subset function and the second part of the string is the new element. I've attached an example that I hope will explain it.
Thanks to both of you. That is exactly what I was after, now I can move on, hopefully I will not run into anymore problems, but if I do I will know were to come for help, thanks guys.
Actually there is one more thing, I would like to lable the array, but what I have read, and tried, if I change the label on one, they all change. Could I have done the previous manipulation of address and data using a cluster as the indicator, so that I could easily label the indicators? Thanks.
If you want to display a single row as a cluster, you could modify my example to have an index array function with the row input wired to the decoded index and then use an array to cluster function.