Skip to content
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

phidget IO command error message "Failed to set" #1141

Closed
ivanroaster opened this issue Apr 2, 2023 · 6 comments
Closed

phidget IO command error message "Failed to set" #1141

ivanroaster opened this issue Apr 2, 2023 · 6 comments
Labels
Milestone

Comments

@ivanroaster
Copy link

Artisan v2.82 (build f525b16)
Phidgets22 v1.14.20230331

Phidget REL1101_1 (16x Isolated Solid State Relay Phidget)

Artisan Events - Buttons
Action: IO command
Documentation: set(ch,{},sn:p), where ch is channel, sn serial number p port
Value: 1 on / 0 off

When executing the button:
message displayed in Artisan "Failed to set (ch,1,sn:p)"
message displayed in Artisan "Failed to set (ch,0,sn:p)"
and no action happens in the phidget

Notes:
the same phidget channel digital state can be changed correctly from the phidget control panel
the same phidget channel can be controlled through Artisan using
Action: PMW command
Documentation: out(ch,{},sn:p), where ch is channel, sn serial number p port
Value: 100% on / 0% off

Expected behavior
set on or off the digital state of channel ch in module attached to port p of hub sn

@MAKOMO
Copy link
Member

MAKOMO commented Apr 18, 2023

By design each physical Phidget channel can be used only in one way (accessed via one API). So either that solid state channel is used via the PWM API or the IO API.

I assume you first used a PWM Command which reserves the channel for PWM access. Then you tried addressed it via an IO Command which failed as the (hardware) channel was already in use (by the PWM API).

If you would restart Artisan (to free the channels) and first send an IO Command it should work, but later PWM Commands on the same channel will fail.

This is a technical restriction which is maybe avoidable in this case, but not for channels like HUB ports that can act as analog/digital input or output.

Can you confirm?

@ivanroaster
Copy link
Author

Hi Marko,
Thanks for your reply.
Today I created a new button and tested what you mentioned but unfortunately, no, I keep getting the failed message with IO commands even when I first run this command before anything else after restarting Artisan using REL1101_1 and a phidget hub. With the PWM commands I can do an out and toggle functions with no problem.
Is this functionality tested with this phidget module and current phidgets22 api?
Thank you
Ivan

MAKOMO added a commit that referenced this issue Apr 23, 2023
- adds Kaleido Legacy setup
- turns serial port popup on machine setup editable
- fixes IO Command support for Phidget REL1101 (Issue #1141)
@MAKOMO MAKOMO added the bug label Apr 23, 2023
@MAKOMO MAKOMO added this to the v2.10.0 milestone Apr 23, 2023
@MAKOMO
Copy link
Member

MAKOMO commented Apr 23, 2023

Dear Ivan,

Yes, this is tested and working using a REL1100_0 on the current phidgets22 api. Note that Artisan does not support the older 2.1 Phidget API anymore (for quite some Artisan versions!).

Screenshot 2023-04-23 at 09 39 29

I don't have a REL1101_1. Just found a typo in the code responsible for discover IO Phidgets and it was looking twice for REL1100, but never for REL1101. Sorry. Fixed that. Please download and install the continuous build (should be online in a few minutes) from here

https://github.com/artisan-roaster-scope/artisan/releases/tag/continuous

If that works successfully for you, please confirm such that I can close this issue here.

@ivanroaster
Copy link
Author

Hi Marko, I just tested it with the continuous release link you sent me and it works perfectly. Thank you for the fix!

@MAKOMO
Copy link
Member

MAKOMO commented May 3, 2023

I just joined those two APIs in my latest commit. Now you should be able to use both APIs on the same attached module in parallel. Thanks for the hint!

@MAKOMO
Copy link
Member

MAKOMO commented May 12, 2023

@ivanroaster: we've just uploaded a (signed) beta of the next Artisan release for review by Artisan experts like you.

https://github.com/artisan-roaster-scope/artisan/releases/tag/v2.8.3-beta

This version includes only a few minor new features, but lots of bug fixes. Release History:
https://github.com/artisan-roaster-scope/artisan/blob/master/wiki/ReleaseHistory.md

Maybe you find time to test this version on your setup and report back issues.

Thanks,
Marko & Dave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants