07-22-2024 12:39 PM
Hi,
I am fairly new with using Labview and I am having troubles with some scale readings.
I have a scale connected via a DAQ to a VISA serial. The graph should be at a constant number as the weigh on the scale is constant; however, I am getting a weird spike on the graph itself (and when I write to file) where it randomly jumps to zero. I have attached screenshots below.
All the setting on the scale allow for continuous reading even if not stable.
Any suggestions as what the issue might be?
07-22-2024 12:49 PM
Ensure that new data is available at VISA BEFORE reading it. It looks like the function returned Zero (after timeout for example) because VISA didn't find any new data.
07-22-2024 01:06 PM
Could you expand a bit more on that?
More info: I am running this VISA as a sub-VI.
07-22-2024 01:17 PM
Hi student,
@hmcengstudent wrote:
I have a scale connected via a DAQ to a VISA serial.
You don't connect a scale "via a DAQ" to "a VISA serial"…
@hmcengstudent wrote:
All the setting on the scale allow for continuous reading even if not stable.
Any suggestions as what the issue might be?
One issue: you don't attach your code. We cannot edit/run/debug images with LabVIEW…
Another issue: did you watch this video yet?
07-22-2024 01:32 PM - edited 07-22-2024 01:33 PM
Hi! I'm sorry I am new to this.
I have attached the code below.
Thank you for the video suggestion!
07-22-2024 01:33 PM - edited 07-22-2024 01:34 PM
@hmcengstudent wrote:
Hi! I'm sorry I am new to this.
I have attached the code below.
Thank you for the video suggestion!
Unfortunately, nothing attached.
07-22-2024 02:12 PM
Hi student,
@hmcengstudent wrote:
Hi! I'm sorry I am new to this.
And you are using the very latest LabVIEW version.
Could you please downconvert (File->Save for previous) to LV2021 or older? I prefer LV2019.
07-22-2024 02:25 PM
What scale are you trying to communicate with? We need a lot more information on the communication protocol before we can give any real advice.
But some general comments:
1. If you are not using the standard display style for your string constants, make the display style visible (right-click, Visible Items->Display Style).
2. Turning the Termination Character off is a major red flag to me in an ASCII based protocol. That is likely a problem.
3. Your Write and Read should be in a loop if you want to keep getting measurements.
07-22-2024 03:47 PM
I am using the current software. I have attached it as the 2019 version.
I am using a cole-parmer lb-200-6002i that is connected to labview via an rs-232.
07-22-2024 04:24 PM
Thank you for attaching your 2019 version of your code.
What @crossrulz was mentioning was that many instruments (and probably your Cole-Parmer) "speak and listen in ASCII", as indicated by your command "CP\r\n". They will answer the same way, a string of text followed by <CR><LF>. Take advantage of this by doing the following:
Bob Schor