-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement Request: Set ramp rate #127
Comments
See also #108 |
@patr1ck Thanks for the enhancement suggestion. PR is welcome of course. I may be able to add some functionality here, but no longer work with Alicats regularly. Regarding your use case:
|
Hey Alex, Thanks so much for the response! I super appreciate the all work done and shared on this module so far – it's extremely helpful. To answer your questions:
We've worked around this API not existing by adding simple ramping in our automation, but it would be awesome to rely on the device to do it instead of our own code. I probably don't have time to dig into the serial connection code and add it myself, but would be happy to test if it becomes available in the future. |
After a bit of testing I realized that I do not have access to a device with firmware new enough for ramping (!). So I'll have to work a bit 'blind' For the time being I have a small fix for #108 in https://github.com/alexrudd2/alicat/tree/ramp Would you mind testing that branch? To know how this is being used (and for my own curiosity), do you mind sharing your organization and use case? |
Wow, awesome, thank you Alex! I'll test this on Monday when our system is available. I work for Ammobia and we use various Alicat devices in our experimental systems. We use Pyopticon instead of LabView to do a lot of our automation of those systems, and have written some Alicat widgets for Pyopticon which leverage this library. There's nothing proprietary about them, so we plan to publish them as soon as I can clean them up into a neat package. (They are mostly just glue between this library and Pyopticon anyways.) |
I've tested the branch and |
That's good news! I didn't write
Cool tech! Don't forget to get the upgraded seals for pure NH3 streams. If you need a Python programmer with experience with laboratory and SCADA systems (in Central timezone), please contact me at alex <*AT> ruddick.tech. |
Can you try Also can you let me know if the tests run against a real device? Just change the lines below. Lines 9 to 12 in d25d91d
from alicat.driver import FlowController
ADDRESS = '{YOUR SERIAL PORT}` |
Sorry I've been a bit slower in testing this, the one system we have to do this on has been in use, but I hope to do it tomorrow. |
Hey Alex, sorry this took so long, the long weekend kind of messed up our schedule. I tested it today and Separately, I had some trouble getting the tests to run due to our non-standard environment (Windows, anaconda, etc). I'm going to work on that and get back to you when I have a chance to fix that. |
Can you tell me what the Alicat returns? Either the Python You can file other issues for Windows and/or Anaconda. No experience with (Ana)conda; sorry. Note that The code should be fine on Windows; it's been straightforward on similar drivers Most likely the problem is the serial port drivers, which Windows usually f@$# up. It's best to manually install drivers for your serial adapter chip (I recommend chips from FTDI). Sometimes the baud/parity are hardcoded in Device Manager, or it uses an unexpected COM port. |
Another option is to offload the serial onto an Ethernet/serial adapter. I'd recommend USConverters.com - although they're just white-labeled from Taiwan/China, the support and docs are very helpful. Their nicer models allow you to write serial commands using a web interface (don't forget to add CR). This also lets you poll from, say, a Linux server in a rack somewhere. |
The system we want this for is in near constant use, so I found another MFC I was able to appropriate for my own use/testing. Answer to your first question:
Here's the full output of the tests:
|
Thanks! Hmm, I think this line: values = line[6:].split(' ') should be changed to: values = line[2:].split(' ') |
Nice, that seems to fix get_ramp_config():
|
OK, great. That fix is incorporated in Now that we have the configuration working, I'll think about what the best way to set the ramp rates is. I think doing things incrementally is my best approach without the physical hardware. Sorry it takes longer.
That's good. There are essentially two failing tests. |
Gotcha, I removed 'B' and hit another error: the tests were failing because the dictionary being returned from get_ramp wasn't matching what was sent through set_ramp. I looked into it a bit more (because I could see the values changing on my device so it was clear set_ramp was working) and noticed a simple read error in get_ramp. Around L593 it should be:
Now all tests pass :) |
Alicat MFCs allow you to set a ramp rate on device – it would be great if we could set that through the python API as well.
Thanks!
The text was updated successfully, but these errors were encountered: