LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending data randomly from transmitter

hye...

here i got some problem, regarding on sending data..

how can i make the data to be send randomly... which i mean

 

example...

at first time..i sending assign transmitter A, followed by transmitter B, and then C...

after that.... it send transmitter B, then A, and C..

then....it send C, B and A...

 

its not follow sequence...it can be any transmitter to send first...

it is i need to used the flat sequence? how to do that?

i donno how to make the transmiiter to send randomly data... it is any alternative?

can u show me...thank you...

0 Kudos
Message 1 of 8
(3,149 Views)
Do you want it to be actually random, or do you just want it to use the first transmitter available?
0 Kudos
Message 2 of 8
(3,147 Views)
You don't have three separate transmitters. You have a single serial port that you are writing to. You can just randomize the data you are sending.
0 Kudos
Message 3 of 8
(3,134 Views)
You don't have three separate transmitters. You have a single serial port that you are writing to. You can just randomize the data you are sending. >>>> can u explain more detail?...i want 3 data sent randomly at the same time...which mean...
 
i run it once, then the transmitter A will send the data first. After that transmitter B sending, and lastly C..
randomly means, not nessasary the transmitter A to send first...It can be transmitter B, or transmitter C..
 
0 Kudos
Message 4 of 8
(3,116 Views)
I don't know how to make it any clearer. You have a single serial port that you are writing to. You have three separate VISA Writes going to the same port. You can only write to that single port one at a time - the three VISA Writes cannot happen at the same time. You could simplify your code and have a single VISA Write. then you could randomize the data.
0 Kudos
Message 5 of 8
(3,108 Views)
here..i attach the new file that i did...but have some error...it cannot go to transmitter B
0 Kudos
Message 6 of 8
(3,090 Views)
0 Kudos
Message 7 of 8
(3,087 Views)
Using floating point numbers for comparisons is problematic and you have made it much too complex. Here's something simpler that you can try. It just randomizes the data as I said earlier and uses a single VISA Write. No need at all for more than one since you only have a single com port.
0 Kudos
Message 8 of 8
(3,064 Views)