LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA: (Hex 0xBFFF006C) An overrun error occurred during transfer.

Could you please check now? Otherwise, I will try on another laptop. Somehow it seems not to change the version. I tried several times.

 

Thank you

0 Kudos
Message 11 of 19
(290 Views)

Hi Raj,

 


@HarshRaj18 wrote:

Could you please check now? Otherwise, I will try on another laptop. Somehow it seems not to change the version. I tried several times.


It changes the LabVIEW version when you use SaveForPrevious…

 

On your VI: why don't you cleanup the block diagram? Readable code helps to minimize problems!

 

See this:

 

  • What do you want to achieve with the ElapsedTime function inside the case structure?
  • Why is there a wait function inside the case? Placing such wait functions is enforcing buffer overflows in the communication bus!
  • Do you really need to write a XLSX file? Would a simple CSV file be sufficient? (Writing CSV files is often much faster…)
  • You forgot to provide a typical device message, so see my string handling only as suggestion for possible improvements. There's room for more improvements…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 19
(288 Views)

One of my suspicions was correct.  Each time you write your command, the device sends the OK response and then the data.  So you need two reads after the sending the command.  The first read will be the OK and the second read will be your data.


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 13 of 19
(279 Views)

I just took longer to do a clean up than I should have.  But here is how I would set this up.  The main thing I did here was create a subVI for sending the command.  The insides of that subVI are concatenating the carriage return to the command (I do not trust the VISA property), write the command, read the acknowledgement, and output if it was an actual ACK.  I then use this for the setup and the data request.


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
Download All
Message 14 of 19
(273 Views)

Hello,

 

Sorry for late follow up. I hope these files are in 2019 version. Here I attach the file provided by you with a little modification. It works fine and responds quickly to the flow change value, however, it is not in the right format after data collection. A modified file is attached to show how I want to record the data. But my modified file doesn't respond to the flow change value quickly. I am attaching the Excel file as well. Please feel free to do any medication and suggest any changes—a huge thanks for your guidance. 

0 Kudos
Message 15 of 19
(243 Views)

Hi,

 

I could solve the earlier problem and the instrument is logging the data correctly. However, I want to use this data logging file to control a PID system. How can I use the same "Flow Modified PID" file (which is already working for data logging) in the file "TSIFlow PID Test" as subVi so that it shows the same value it is reading in the logging file? It reads the Flow, Temp, and Pressure with logging file but when I use it as SubVi, it doesn't read anything in the PID Vi ("TSIFlow PID Test" marked in Blue).

 

In short, data logging is done but I can't use that Vi to control the PID. I can clarify if it needs more clarification. Thank you.

 

 

Flow data logging file.JPG

Flow PID.JPG

0 Kudos
Message 16 of 19
(231 Views)

Somehow the Vi were not attached, here it is in 2019 version. Also, the Zip file contains all the three files together. 

0 Kudos
Message 17 of 19
(227 Views)

Hi Raj,

 


@HarshRaj18 wrote:

How can I use the same "Flow Modified PID" file (which is already working for data logging) in the file "TSIFlow PID Test" as subVi so that it shows the same value it is reading in the logging file? It reads the Flow, Temp, and Pressure with logging file but when I use it as SubVi, it doesn't read anything in the PID Vi ("TSIFlow PID Test" marked in Blue).


You need to OBEY DATAFLOW!

 

  • There should be no loop with a STOP button inside your subVI! Remove the loop…
  • You should split the current subVI into 3 subVIs: "init COM port", "read data" and "close COM port". Do the loggin in your MainVI (or as separate subVI)…
  • Other option: run the current subVI in parallel to your MainVI and communicate between both VIs using queues or channels…

Important: set a better icon on your subVI… (Open icon borders are really annoying!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 19
(222 Views)

@GerdW wrote:
  • Other option: run the current subVI in parallel to your MainVI and communicate between both VIs using queues or channels…

I would go so far as to break up this application into three loops.

1. Data reading loop: Reads the measurements from the device.

2. Main loop: handles the State Machine and PID control.

3. Logging loop: Saves the data to the log file.

 

The idea here is to use Queues to pass the data from the reading loop to the other two loops who do whatever it is they need to do with the data.


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 19 of 19
(205 Views)