petebachant / ACSpy

Python package for working with ACS motion controllers.
MIT License
23 stars 21 forks source link

Serial readings #27

Open renecartaya opened 8 months ago

renecartaya commented 8 months ago

Dear ACSpy team,

I hope you are doing great.

Using your package, I have been developing solutions interfacing between ACS controllers via Python.

I am wondering if it is possible to go deeper than reading position feedback (FPOS) to read count values from specific encoders and other raw data that are normally accessible via SpiiPlus but using Python.

I am looking fordward for your feedback.

Best regards, René

petebachant commented 8 months ago

If there's a function in the C library, it can be wrapped in this package. Is there a C function for the use case you're referring to?

renecartaya commented 8 months ago

Hi Pete,

Thank you very much for your quick reply.

The ACSPL+ Programmer's Guide detail FPOS = FP*EFAC + EOFFS. FP refers to the encoder counts I need, apart from the EFAC conversion factor.

Nevertheless, SPiiPlus C Library Reference Programmer's Guide mentions EFAC and a variable FPosition, which I guess refers to FP from ACSPL+.

Is it possible to access FP and EFAC via ACSPy?

Best regards, René

petebachant commented 8 months ago

You could try efac1 = acsc.readReal(..., ..., varname="EFAC(1)") to get the encoder factor for axis 1, for example.