Search Results

by YLM
Mon May 03, 2021 6:27 am
Forum: Python
Topic: make computation with many voltageRatio
Replies: 0
Views: 17709

make computation with many voltageRatio

Hi, I am using a phidget bridge input in order to receive data from many load cell, then I'd like to make computation between the different signal I receive. Here is what I tried but I got an error : t = channel0 + channel1 UnboundLocalError: local variable 'channel0' referenced before assignment A0...
by YLM
Wed Aug 26, 2020 6:12 am
Forum: Linux
Topic: Rotary encoder, position change for 1 lap
Replies: 1
Views: 11320

Rotary encoder, position change for 1 lap

Hi, I have got the rotary encoder 4mm shaft (3530) and got the sample code example for quadrature encoder. from Phidget22.Phidget import * from Phidget22.Devices.Encoder import * import time def onPositionChange(self, positionChange, timeChange, indexTriggered): print("PositionChange: " + ...
by YLM
Wed Jan 15, 2020 1:41 am
Forum: Linux
Topic: setDataInterval does not work while running in while loop
Replies: 4
Views: 17838

Re: setDataInterval does not work while running in while loop

ok thanks (sorry for easy questions)
by YLM
Tue Jan 14, 2020 10:17 am
Forum: Linux
Topic: setDataInterval does not work while running in while loop
Replies: 4
Views: 17838

Re: setDataInterval does not work while running in while loop

Great thank you. For what goal is your time.sleep(5) because this code run more than 5 seconds...
Thanks
by YLM
Tue Jan 14, 2020 6:57 am
Forum: Linux
Topic: setDataInterval does not work while running in while loop
Replies: 4
Views: 17838

setDataInterval does not work while running in while loop

Hi, with PhidgetBridge 4 input, I am using the setDataInterval() API to set the sample rate of the acquisition. I am trying to run the code inside a while loop to acquire the data for long time. I have set the frequency of 1 Hz but when I print the result with the time it appears to not be 1 Hz but ...
by YLM
Fri Nov 22, 2019 2:57 am
Forum: Linux
Topic: Making computation with 2 channels using python
Replies: 7
Views: 21302

Re: Making computation with 2 channels using python

curently I am writing my code inside Sublime Text and then I run the code inside the terminal using

Code: Select all

python3 mycode.py
This is not the good solution ?

Thank you
by YLM
Thu Nov 21, 2019 8:46 am
Forum: Linux
Topic: Making computation with 2 channels using python
Replies: 7
Views: 21302

Re: Making computation with 2 channels using python

With my previous code, with the try: input("Press Enter to Stop\n") except (Exception, KeyboardInterrupt): pass I had the value in my console using my DATA_INTERVAL until I press 'Enter'. Now with the print of 2 Channels inside the main I only have one print and then the code stop.. Do you...
by YLM
Thu Nov 21, 2019 7:29 am
Forum: Linux
Topic: Making computation with 2 channels using python
Replies: 7
Views: 21302

Re: Making computation with 2 channels using python

Great. Thank you !
by YLM
Wed Nov 20, 2019 2:17 am
Forum: Linux
Topic: Making computation with 2 channels using python
Replies: 7
Views: 21302

Making computation with 2 channels using python

Hi, I used the generated python code to get the signal of 2 channels, I modify it a little bit and did some calibration. Now that I have my 2 channels independently, I'd like to use them together in order to make some computation. Here is the code : from Phidget22.Phidget import * from Phidget22.Dev...
by YLM
Tue Nov 19, 2019 2:12 am
Forum: Python
Topic: Changing sample frequency of acquisition
Replies: 2
Views: 9246

Re: Changing sample frequency of acquisition

perfect, thank you