Help: VINT Hub, Wheatstone bridge, & Load cell-data recording problem

Supporting 2.7 and 3.2+
Post Reply
Bryan_K
Fresh meat
Posts: 2
Joined: Mon Aug 27, 2018 4:23 am
Contact:

Help: VINT Hub, Wheatstone bridge, & Load cell-data recording problem

Post by Bryan_K »

Hi, I am trying to record load-cell data continuously, for example,for 2 or 3minutes, using VINT Hub and Wheatstone bridge DAQ1500_0, and a generic load cell.

Hardware list: VIT Hub Phidget HUB0000_0
VoltageRatioInput Wheatstone bridge DAQ1500_0
Generic loadcell with 5 leads
Software/OS: Windows 7 64bit,Python3.7 64bit for Windows
Phidget app: 1) python example script from your site for voltage ratio input
2) another graphic-user-interface,GUI, example for Phidget, with automatic module recogition(I am not quite sure about the correct name of the ready-made app Phidgets supplies: Sorry for that ;).

When I run the phidget app with GUI, it seems correctly reflect the changes in force exerted on the loadcell, and shows the changes accordingly. This app only shows momentary value on the GUI of Phidget, therefore, I chose the python script example,"VolageRatio.py."

In case I run the python example, however, the recorded values don't seem to reflect the force changes very well.
Recorded values seem to be stuck on some one or two data, when I record the loadcell value for 30 seconds using Python. One thing I also noted is that the value levels are quite different than those shown on the GUI phidget app.

Just in case, I made a partial copy of the phidget python code for voltage ratio input, even thought it might be useless for the gurus.

==== part of the python script shown in Phidget site, voltage-ratio ==
import sys
import time
import traceback
from Phidget22.Devices.VoltageRatioInput import *
from Phidget22.PhidgetException import *
from Phidget22.Phidget import *
from Phidget22.Net import *

try:
from PhidgetHelperFunctions import *
except ImportError:
sys.stderr.write("\nCould not find PhidgetHelperFunctions. Either add PhdiegtHelperFunctions.py to your project folder "
"or remove the import from your project.")
sys.stderr.write("\nPress ENTER to end program.")
readin = sys.stdin.readline()
sys.exit()

"""
* Configures the device's DataInterval and ChangeTrigger.

===================================

Questions are
1) Do I have to use rather old Python version instead of 3.7?
2) Are there any other module or python script I have to run prior to the "voltage-ratio.py?"
3) Any other suggestions

Thanks in advance,

Jong KIM
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Help: VINT Hub, Wheatstone bridge, & Load cell-data recording problem

Post by mparadis »

This shouldn't be an issue with python version, and there's no other script you need to run.

It's likely that voltage-ratio.py is opening the wrong VoltageRatioInput channel, which would explain why the channel is successfully attaching and getting data back, but the data is incorrect and hovering around a static value.

In order to make sure the correct VoltageRatioInput channel is being opened, make sure you're setting the following properties:

setDeviceSerialNumber - should be set to the serial number on the underside of your VINT Hub.

setHubPort - should be set to the port number on the VINT Hub that the DAQ1500 is connected to.

setChannel - should be set to the channel number on the DAQ1500 that the load cell is connected to.

setIsHubPortDevice - this is false by default, so you don't need to set it. But if your program is setting this as true, change it to false. If this property is set to true it will treat the port on the VINT Hub as a VoltageRatioInput which will cause it to try to interpret communication data with the DAQ1500 as raw load cell voltage.
Bryan_K
Fresh meat
Posts: 2
Joined: Mon Aug 27, 2018 4:23 am
Contact:

Re: Help: VINT Hub, Wheatstone bridge, & Load cell-data recording problem

Post by Bryan_K »

Dear mparais,

I really appreciate your kind and detailed guide to my questions. :D

As per your suggestions, I have made correct selections for the HubPortDevice, and channel numbers.
Actually I did not fully understand the HubPortDevice questions. :roll:
Now, the voltage output recording is perfect when I follow your guidance.

Partial copy of the steps I made ----------

| A VoltageRatioInput HubPortDevice uses the VINT Hub's internal channel to measure the voltage ratio on the white wire.
| If the device you are trying to interface returns an ratiometric voltage between 0V-5V, open it as a HubPortDevice.

Is this a "HubPortDevice"? [y/n]
n

--------------------------------------

| Devices with multiple inputs or outputs of the same type will map them to channels.
| The API tab for the device on www.phidgets.com shows the channel breakdown.
| For example, a device with 4 DigitalInputs would use channels [0 - 3]
| A device with 1 VoltageInput would use channel 0

What channel# of the device do you want to open? [0]
1
================
Thank you so much,

Jong KIM
jackmoldave
Fresh meat
Posts: 1
Joined: Tue Jun 18, 2019 8:54 am
Contact:

Re: Help: VINT Hub, Wheatstone bridge, & Load cell-data recording problem

Post by jackmoldave »

Thank you so much. I had this exact same problem and you just saved me hours!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest