Git Product home page Git Product logo

Comments (16)

alexrudd2 avatar alexrudd2 commented on July 28, 2024

Can you add a print(values) to line 113?

        command = '{addr}\r'.format(addr=self.address)
        line = self._write_and_read(command, retries)
        spl = line.split()
        address, values = spl[0], spl[1:]
      ++print(values)

It looks like this flowmeter may be returning a date, which I haven't seen before. unfortunately, I don't have one at hand to test.

from alicat.

alexrudd2 avatar alexrudd2 commented on July 28, 2024

Also, what's the serial number? Alicat tech support can tell you exactly what that model will output over serial. Sometimes @marinapalese lurks in this repo, also.

from alicat.

hairem avatar hairem commented on July 28, 2024

from alicat.

hairem avatar hairem commented on July 28, 2024

it doesn't support just reading the outputs? isn't it a mass flow meter?

from alicat.

alexrudd2 avatar alexrudd2 commented on July 28, 2024

OK, that's interesting. Didn't even know this device existed! This repository does not support anything other than the M- and MC-series differential pressure flow meters/controllers. I would merge a PR extending to other devices, but cannot provide support for other devices we don't have.

The manual is provided here: https://documents.alicat.com/manuals/Alicat_FP-25_Calibrator_Manual.pdf

Page 42 lists the serial communications format.
Screenshot 2022-12-05 at 11 25 21 AM

Note the date/time at the front of the data frame, and pressure source/humidity at the end. Those are what's confusing the existing driver, which does not know about them.

from alicat.

hairem avatar hairem commented on July 28, 2024

I have been using the serial lines directly before using this library but the putout shifts with time. Thank you for the help.

from alicat.

alexrudd2 avatar alexrudd2 commented on July 28, 2024

I'm sorry I can't help directly. I think you have a couple of options.
(1) Fork this repository and extend the functionality yourself, using the manual above.
(2) Contact Alicat support - @marinapalese / [email protected] would be my first contact
(3) Contact @JosephHickey1 ([email protected]) and ask him about his repository Alicat-Python. I know very little about it but believe the intention was to make a more generalized controller. I do not know his current relationship with Alicat - he used to be employed there but no longer. Perhaps he is available as a contract programmer?
(4) Look through the manual and see if there is a way of disabling the "extra" data on the device to avoid confusing the driver as-is. (I see this as unlikely)

I'm happy to review / merge any code generated by the above strategies. Good luck :)

from alicat.

hairem avatar hairem commented on July 28, 2024

I will probably just make my own library for the project I am working on, was just trying to use what was already available. Or maybe I will do as you suggest and branch this library for my project, it is an in-house script so I have no plans to sell or distribute it.

from alicat.

hairem avatar hairem commented on July 28, 2024

As for the device, we just ordered these maybe 2 years ago, and are the standard we have in the office. I'm surprised you are unaware of them. Are these some kind of special meters?

from alicat.

hairem avatar hairem commented on July 28, 2024

After adding the print line I get this now:
['0000000', '2022-12-05', '0010:46:41', '+0755.3', '+0000.5', '+754.86', '+018.72', 'P', '+00.001', '+00.001', '049', 'RHAir']
Traceback (most recent call last):
File "/home/pi/.local/bin/alicat", line 10, in
sys.exit(run())
File "/home/pi/.local/lib/python3.7/site-packages/alicat/init.py", line 48, in run
command_line(args)
File "/home/pi/.local/lib/python3.7/site-packages/alicat/serial.py", line 567, in command_line
state = flow_controller.get()
File "/home/pi/.local/lib/python3.7/site-packages/alicat/serial.py", line 390, in get
state = FlowMeter.get(self, retries)
File "/home/pi/.local/lib/python3.7/site-packages/alicat/serial.py", line 128, in get
for k, v in zip(self.keys, values)}
File "/home/pi/.local/lib/python3.7/site-packages/alicat/serial.py", line 128, in
for k, v in zip(self.keys, values)}
ValueError: could not convert string to float: '2022-12-05'

the string is output but so is the error about it not being formated right
PROGRESS!!

from alicat.

alexrudd2 avatar alexrudd2 commented on July 28, 2024

As for the device, we just ordered these maybe 2 years ago, and are the standard we have in the office. I'm surprised you are unaware of them. Are these some kind of special meters?

I don't work for Alicat, we just buy (some of) their equipment. We use another vendor for humidity logging.

from alicat.

hairem avatar hairem commented on July 28, 2024

Oh, my bad. They linked to you so I thought you worked for them.

from alicat.

hairem avatar hairem commented on July 28, 2024

I got it to work, somewhat, but commenting out the lines 114-127.
now I get "['0000000', '2022-12-05', '0011:32:10', '+0755.1', '+0000.4', '+754.73', '+019.20', 'P', '+00.000', '+00.000', '049', 'RHAir']
None
"

from alicat.

alexrudd2 avatar alexrudd2 commented on July 28, 2024

Use the manual (or screenshot I posted above) to update this code:

self.keys = ['pressure', 'temperature', 'volumetric_flow', 'mass_flow',

from alicat.

JosephHickey1 avatar JosephHickey1 commented on July 28, 2024

Pushing a stable version of the Alicat-Python was actually my last hurrah with Alicat but I'm still around and happy to support the library as I can. Bill Nick at Alicat is currently the caretaker for the program though in case issues like this pop up on the future.

As Alex has said, updating the self.keys list to include the time and date information should resolve this. Alternatively, the other library should dynamically retrieve the keys when the program does initialization for the first time for the device.

from alicat.

hairem avatar hairem commented on July 28, 2024

Again, thank you for all your help.

from alicat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.