LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read 3 serial port from Arduino in labview

i have 3 RFID reader that each one of them joined to one arduino and receive data from 20 RFID card that they set from number 01 to number 20. so i need to see and store each card when it read by each RFID.

i need to have led turn on and remind on in labview when each card read from any RFID.

and i need to save data in a excel file like ( time and  date each card read and number of card ). each card read two time start of job and end of job. so i can see how much time took for that job to finished.

 

0 Kudos
Message 11 of 16
(1,248 Views)

can you fix just part of my code in way you think and then i do all like that?

also that high resolution time is not needed. i deleted them.

0 Kudos
Message 12 of 16
(1,244 Views)

Hi amkamyab,

 

i have 3 RFID reader that each one of them joined to one arduino and receive data from 20 RFID card that they set from number 01 to number 20.

So you need a datastructure able to store 60 entries. (Use an array!)

 

each card read two time start of job and end of job. so i can see how much time took for that job to finished.

So you need to store for those 60 entries just 2 values: use a 2D array of 60 rows and 2 columns…

 

Suggestion:

- start from scratch.

- At first create a VI just for the purpose of a stable communication with your Arduino. Have it receive the slot numbers in a error-proof way.

- Once you got that you create another VI able to store those 60×2 timestamps and calculate the time differences…

- At last you implement the data saving to CSV files…

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 16
(1,243 Views)

Hello everyone

as i put in fallow, i have a program that will read number 1 and 6 and 16 and record them in a excel file. but i don't know why sometimes for example real data is 16 and labview record it as 1 and 6. i don't know what is wrong

 

0 Kudos
Message 14 of 16
(1,250 Views)

Move conf VISA from loop

com.png


And you really get string "16"? May be you receive only one byte

0 Kudos
Message 15 of 16
(1,237 Views)

Hi amkamyab,

 

i don't know what is wrong

Wrong is to create a new thread for (more or less) the same problem - without providing needed background information. That's why I moved your message!

 

It's also wrong to use BytesAtPort as I told you before!

 

for example real data is 16 and labview record it as 1 and 6

Is it still the same sender routine on your Arduino?

Then why do you still use FractStringToNum?

(You also didn't change those ArrayToCluster/Unbundle operations. You still collect TRUE values in evergrowing arrays…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 16
(1,234 Views)