Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Serial Communication via Serial port COM# is unreliable

Hi!

Yes. I did the configuration recommended, however, there is a slower communication than last configuration.

I need to have a fast serial communication continuously! How to achievement a fast serial communicaction e.g (50ms per iteration from reading mode)

I attached a few pictures

 

 

 

Download All
0 Kudos
Message 11 of 13
(591 Views)

1. You can remove the wait in that loop.

2. You should remove the Serial Monitor and the related Concatenate String and shift register.  When you constantly add to a string, this becomes a slow memory allocation over time.

3. I would replace your XY Graph with a simple Chart.  This way you don't have the ever-growing array issue, which can really slow down your loop.  And the Chart also keeps a history (defaults to 1024 samples).  So this would also remove the need for the Build Arrays and shift registers.

4. There is a primitive called Increment that does the +1.  This will save you some space and make things more readable.

5. There is a primitive called Empty String/Path? that you should also look at using instead of comparing a string to an empty string.


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 12 of 13
(579 Views)

 1.- I use the wait to wait for Arduino to exit boot loader.

2.- I have a GUI, where It's necessary to have the serial monitor for the history of the user commands.

3. I will replace the XY Graph with a simple Chart.

4. the primitive called Increment helps me to create a Index of the History into .txt file.

To be honest, I have used the last configuration and runs better than this but, my last configuration some times breaks the serial communication. So, I sent the topic : Visa Serial Communication via Serial port COM# is unreliable.

I attached a pic of the front panel.

Thank you!

0 Kudos
Message 13 of 13
(569 Views)