LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from loadcell connected by USB

Trying to connect to a F329 Deci-newton load cell.  The manual can be found here:

DSCUSB - Load Cell & Strain Gauge to USB Converter (mantracourt.com)

 

I am trying to communicate with the load cell via the virtual com port and the load cell takes ASCII commands.  

 

This command of the script collects readings from the load cell

!001:SYS?<CR>

 

When I try to run this code, (screen shot attached) I don't get a reading but the code just runs continuously.   I can connect to the load cell via a software the company provided, but I am having trouble in labview. 

 

0 Kudos
Message 1 of 2
(1,456 Views)

Hi BertK,

 


@Bertk wrote:

This command of the script collects readings from the load cell

!001:SYS?<CR>

When I try to run this code, (screen shot attached) I don't get a reading but the code just runs continuously.


Because you apparently don't know the meaning of "<CR>"!

This indicates the CarriageReturn character, or a byte of value 13 (decimal)/0D (hex)! You need to change just the string constant:

  1. As first step you enable the display mode indication in the context menu (aka right-click menu) of that constant.
  2. Then you select the "\-code" displaymode.
  3. Then you delete the "<CR>" text and type "\r" instead.

(Read the LabVIEW help on this different display modes!)

 

Btw. you don't need to add a NewLine (aka NL aka \n aka 10d aka 0Ah) when your device is waiting for a CR…

Best regards,
GerdW


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