ftrobopy - problem with voltage inputs in TransferArea Mode

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
Benutzeravatar
ft-ninja
Beiträge: 113
Registriert: 01 Nov 2010, 14:26
Wohnort: Inner Mongolia
Kontaktdaten:

ftrobopy - problem with voltage inputs in TransferArea Mode

Beitrag von ft-ninja » 12 Jan 2021, 18:17

Hi @Torsten,

I found some problem with ftropbopy 1.94 - it works only with outputs. When I tried to read Input value it returns 0. My test code is simple:

Code: Alles auswählen

#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import ftrobopy
import time

txt = ftrobopy.ftrobopy('localhost', use_TransferAreaMode=True)
inp = txt.voltage(1)

for x in range(5):
    inp_voltage = inp.voltage()
    print("inp_voltage: ", inp_voltage)
    time.sleep(1.0)
Console output:

Code: Alles auswählen

$ python test-02.py
IO-1
StartTxtDlPrg-4 Thrd-Run
Connected to  TXT TransferAreaMode firmware version not detected
inp_voltage:  0
inp_voltage:  0
inp_voltage:  0
inp_voltage:  0
inp_voltage:  0
MenueBase::Finished: ROBOProDisplayPseudoMenue not active or was activated by ROOT

By the way, If I use “use_TransferAreaMode=False” it works fine:

Code: Alles auswählen

$ python test-02-a.py
Connected to  TX2013 firmware version 4.6.6
inp_voltage:  4220
inp_voltage:  4227
inp_voltage:  4229
inp_voltage:  4225
inp_voltage:  4222
MenueBase::Finished: ROBOProDisplayPseudoMenue not active or was activated by ROOT
Is there any problems with Input voltage reading in current ftrobopy release (1.94) ?
==
ft-ninja

Torsten
Beiträge: 324
Registriert: 29 Jun 2015, 23:08
Wohnort: Gernsheim (Rhein-Main-Region)

Re: ftrobopy - problem with voltage inputs in TransferArea Mode

Beitrag von Torsten » 24 Jan 2021, 14:57

Hi ft-ninja,

apologies for my delayed answer but I was very busy in the last 2 weeks.

... and yes, you were right, there was a bug in the TA code of ftroboby 1.94.

I uploaded the fixed version (1.96) to github.

Best wishes,
Torsten

Benutzeravatar
ft-ninja
Beiträge: 113
Registriert: 01 Nov 2010, 14:26
Wohnort: Inner Mongolia
Kontaktdaten:

Re: ftrobopy - problem with voltage inputs in TransferArea Mode

Beitrag von ft-ninja » 27 Jan 2021, 18:15

Thank you. Inputs voltage reading confirmed.
==
ft-ninja

Antworten