LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array sequence

hello,

 

Here i have a trouble when passing an element from an array to a serial port.

 

What should the VI do?

1. Firstly tha values are stored in an array.

2. So, now the array have the data that has to be send serially through serial port(RS232).

3. Now, the data in the array has to be send in a sequence (one by one), and once an element is send serially it has to w8 till it recieves the acknowledgment that it is recieved and then the other element has to be sent.

 

Here, i'm able to store the elements in an array, but while retreiving the data from array serially i'm facing a trouble.

 

So, please suggest me with a solution how to retreive data from an array in a sequence.

 

0 Kudos
Message 1 of 6
(2,989 Views)

How are you sending the data to the serial port? The screen shot does nothing to help us. We need to see that part before any of us can make any reasonable suggestions.

 

Also, load your VI, not a screen shot.

0 Kudos
Message 2 of 6
(2,947 Views)

Just sounds like a second FOR loop to me.  The real question is how should the data be formatted.  You are currently making an array of I32, which has 4 bytes per element.  Are each of those bytes supposed to be sent one at time?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(2,919 Views)

You have one issue with your code.

You have a race condition. The Numeric control is read before you write anything to it. 

This means that you numbers that you store in the array might not be what you think or hope.

 

And while we are at it, why do you have 2 x Wait(ms)?

 

I can't see the reason for having the for loop.

And for the multiple boolean controls, can the use select more than one at the same time?

If not, then use a radio button and place that into an array. Then you can make 6 selections before runing the code, and you will get the array you need.

0 Kudos
Message 4 of 6
(2,909 Views)

Looks like you are trying to accomplish this. 

 

Example_VI.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 6
(2,877 Views)

@tejaphani wrote:
it has to w8 till it

 


You've recieved a lot of good advice already.  Normally I wouldn't post.  But, I wanted to point out you're on a big kid forum.  Please use your big kid words here. "Wait" isn't a difficult word to spell out rather than use obnoxious texting shorthand.

0 Kudos
Message 6 of 6
(2,848 Views)