Giter Club home page Giter Club logo

acspy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acspy's Issues

ACS SPiiPlus Error 132

image

Dear, Pete Bachant

Thanks for your development.

Yesterday I installed ACSpy and trying to test some example with SPiipluse 3,11 simulator

but there were few problems :
image

how can I fix this problem?

I am really sorry to bother you and Thank you for your hlep in advance.

hopefully you always are great.

enable property and enabled method

Dear all,

I really like ACSpy. At the moment, the axis object object, part of the control module, has an enabled property and an enable and disable method. Wouldn't it be better to define a setter for the enabled property, and then if one use true or false run disable or enable!?

Problems with acspy installed via pip command

The acspy installed via the pip command is not the latest version in Code. This causes the problem ERROR 132 (unable to establish connection) when using openCommEthernetTCP. The main reason for this is the following difference in the two acspy.py files:
image
Figure 1
image
Figure 2
The address in Figure 1 is not encoded "10.0.0.100" to bytes type, which is the main reason for this error.

Serial readings

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é

Finish Controller object

Right now this is just started in a very basic sense. All functions should be implemented so the Controller becomes the default interface.

I dont find the acsc module in pip install

When I run the code pv.py in examples, Visual Code report that No module named 'acsc'.And when I use pip install acsc , it dont find this module either.Is there any promblem with the way of my usage?

Motor commutation; ACS command acsc_CommutExt not wrapped

Motor commutation

Some positioning systems (e.g. direct drive with missing hall sensors) need to calibrate the motor commutation. ACS controllers feature a auto commutate function.
This is supported by SPiiPlus C Library from version 2.5 on with the acsc_CommutExt function.

Description:
The function initiates motor commutation.
Syntax
Int acsc_CommutExt(HANDLE handle, int Axis, float Current, int Settle, int Slope, ACSC_WAITBLOCK *Wait)

Arguments:
Handle – Communication handle
Axis – The axis to perform commutation on. ACSC_AXIS_0 corresponds to axis0, ACSC_AXIS_1 –to axis1, etc.
Slope – Specifies the time it takes for the current to rise to the desired value, ACSC_NONE for default value.
Wait – Pointer to ACSC_WAITBLOCK structure.
If Wait is ACSC_SYNCHRONOUS, the function returns when the controller response is received. If Wait points to a valid ACSC_WAITBLOCK structure,
the function returns immediately. The calling thread must then call the acsc_WaitForAsyncCall function to retrieve the operation result.
If Wait is ACSC_IGNORE, the function returns immediately. In this case, the operation result is ignored by the library and cannot be retrieved to the
calling thread.

C Example use:
if(!acsc_CommutExt(Handle,// Communication handle
ACSC_AXIS_0, // Commuting axis 0
43, // Commutation current
ACS_NONE, // Use default settle
ACS_NONE, // Use default slope
ACSC_SYNCHRONOUS // Waiting call
)){
printf(“commutation error: %d\n”,acsc_GetLastError());
}

Can you add this?

Add com module

For using/wrapping the COM library to a more Pythonic API. Should be able to integrate with the object oriented model and use interchangeably with the C library.

ReadReal example does not read correct FPOS value

Hi, I was trying to help a colleague read the FPOS using your very useful ACSpy.

The function given in the read real example did not work for him ( at least on ACS 6.72 or ACS 7.0.0 ).
print(acsc.readReal(hc, acsc.NONE, "FPOS(0)"))
This returns 0.00 regardless of the value for FPOS(0).
I tried this instead , which does work :
print( acsc.readReal(hc, acsc.NONE, "FPOS", 0, 0 ) )
Also might be worth mentioning somewhere that on some PCs using openCommEthernetTCP requires an '.encode()' on the
IP address, but on others using .encode() does not work. This might be across different Python versions , not sure.

Hope this helps, my colleague uses your library quite a bit ( I use the C++ stuff from ACS myself so knew how to help him ).
Thanks.

Increment version number

Fixed major bug that was setting acceleration when setting jerk. Increment and upload to PyPI.

Rename control module?

Maybe something like objects or put these in the top level acspy namespace. I think the latter would be better.

encode string to UTF8 for compatibililty with python 3

Dear Pete Bachant,

I am having a lot of fun with your work. Thanks for that 👍 . You should encode strings to "utf-8'.
Simple stated:
hcomm=acsc.openCommEthernetTCP('192.168.1.40', 701) --> return -1 in python 3.5
hcomm=acsc.openCommEthernetTCP('192.168.1.40'.encode('utf-8'), 701) --> return 0

All my python 2.7 code was therefore not python 3 compatible.
Ideally, I can supply strings from python 3 and they are encoded to "utf-8" in the library.

Best,

Rik

Implement controller reboot function

int acsc_ControllerReboot(HANDLE Handle, int Timeout)

Return Value

If the function succeeds, the return value is non-zero.

If the function fails, the return value is zero.

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.