LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use RS422 serial port communication in LabView.???

Solved!
Go to solution

hello @Gredw

 

1) Even i enable, disable or delete Termchar  doesnt make any difference i get same error as session time ........ and 31bytes is just a sample number it will read below 31 bytes of data if i set 31 

 

2)I didn't connect any device I set my serial port as Loop back, In other languages like c#  i transfer huge text files also, In that textfiles we send large commands thats why i am asking is there is a possibility to send files in labview

0 Kudos
Message 31 of 42
(1,427 Views)

Hi arun,

 

1. when you tell VISARead to wait for 31 bytes it will wait for 31 bytes (or the TermChar). When it doesn't receive 31 bytes (or a TermChar) within the timeout period it will raise an error. It's easy like this…

 

2. How did you "set the serial port as loopback"? Define "huge text files", define "large commands"…

(When you can transfer those files/commands using other programming languages you will also be able to do it using LabVIEW!)

(Did you read Aputman's message? With all its suggestions, especially the 1st one? Please "be thorough in explaining your question"!)

Best regards,
GerdW


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

Hi @GredW

Huge files means  Textfile which have 500 or more (according to the situation)  packets , each packet has 24 bytes of data 

 

0 Kudos
Message 33 of 42
(1,419 Views)

Hi @GredW

1) solved 

 

2) Huge files means  Textfile which have 500 or more (according to the situation)  packets , each packet has 24 bytes of data , 

 

0 Kudos
Message 34 of 42
(1,417 Views)

Hi arun,

 

my nickname is GerdW 😄 (You seem to have problems to write/spell it correctly…)

 

Textfile which have 500 or more (according to the situation)  packets , each packet has 24 bytes of data 

Do you send 500 packets of 24 bytes or do you send one (1) data block of 12000 bytes?

Best regards,
GerdW


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

Hi @Gerdw

In .NET i send each packet at 2.5 ms so totally 400 packets in a text file  we have to send it in 1 sec.. is it possible the same way here in Labview ?? Like sending textfiles in aperticular time limit 

 

Thank You 

0 Kudos
Message 36 of 42
(1,406 Views)

Hi arun,

 

In .NET i send each packet at 2.5 ms so totally 400 packets in a text file  we have to send it in 1 sec..

I see two problems with this description:

minor problem: it's hard to wait (exactly) 2.5ms with LabVIEW when you only have a Wait function with integer inputs

 

MAJOR problem: to send a packet of 32 bytes takes ~30ms using a baudrate of 9600baud as you have configured in your last VI attachment. To send 32bytes within 2.5ms you need a baudrate of >115.2kBaud! (You might stuff your packets into the serial output buffer very fast, but transferring the data will take longer…)

 

Why do you need to send packets of 32bytes with 2.5ms delay between them? Why do you need to use a serial communication to do so?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 37 of 42
(1,402 Views)

Thank you 

One More Last question ... can i get any related article or example VI for sending files with time stamp ( doesn't matter any size and  time ) 

0 Kudos
Message 38 of 42
(1,396 Views)

Hi arun,

 

can i get any related article or example VI for sending files with time stamp

Please explain "file with timestamp"! (You do remember those suggestions of Aputman?)

 

When the timestamps are within the file content: transfer the file like any other file.

When you want to transfer the timestamp of the file (which one: creation time, last change time, ...?) you need to send that information additionally to your file content: just send an additional message/packet!

 

You might look for dedicated file transfer protocols like FTP or tools like Dropbox…

Best regards,
GerdW


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

sorry

 

can you please suggest any article or any example vi for browsing and sending files over serial port in labview instead of sending data directly forget about time  

0 Kudos
Message 40 of 42
(1,391 Views)