Closed jingibre closed 12 months ago
For the most PI Controller the Table-Rate of the wave generators is coupled to the servo loop, and therefor their is only 1 wave table rate for all generators. Their is a more detailed description of how the wave generator works in the manual of the E-727. However the samples are generic and have sometimes to be modified to work with the specified controller.
Hi,
I am having some trouble getting the sample code to work. Its problem appears when setting the Wave Table Rate:
if pidevice.HasWTR(): # you can remove this code block if your controller does not support WTR() print('set wave table rate to {} for wave generators {}'.format(TABLERATE, wavegens)) pidevice.WTR(wavegens, [TABLERATE] * len(wavegens), interpol=[0] * len(wavegens))
Giving the following error:
pipython.pidevice.gcserror.GCSError: Parameter out of range (17).
I have managed to sort of make it work by replacing the
pidevice.WTR(wavegens, [TABLERATE] * len(wavegens), interpol=[0] * len(wavegens))
with
pidevice.WTR(0, [TABLERATE], interpol=[0]))
Just wanted to say that I've been getting the same error (with the 727 too) and was finding a solution for hours until I stumbled upon your issue. Thank you so much for your help!
We are currently working on this and will inform you as soon as there is an update available.
Upon review of your request we think that there is still some need for clarification:
.. only valid for C-887 controller
.WTR
command can only be used with the leading parameter 0, thus setting the table rate for all tables/wave generators simultaneously. Supported commands and parameterizations of your controller can be found in the manual. By calling pidevice.WTR(0, TABLERATE, interpolation))
you do indeed change the table rate for all wave generators.
By printing
pidevice.qWTR()
it returns:
OrderedDict([(0, [10, 1])])
I have not been able to successfully access the remaining axis and edit the other TABLERATE.
Querying pidevice.qWTR()
defaults to pidevice.qWTR(0)
and OrderedDict([(0, [10, 1])])
means that all tables/wave generators have been set to a table rate of 10 and an interpolation rate of 1. To query each table/interpolation rate separately and verify the settings for each table, use the corresponding table id, i.e. pidevice.qWTR(1)
We made some amendments to the documentation regarding controller-specific availability and parameterization of commands which will be included in the upcoming release 2.11.x for PIPython. Thank you for your feedback.
Hi,
I am having some trouble getting the sample code to work. Its problem appears when setting the Wave Table Rate:
if pidevice.HasWTR(): # you can remove this code block if your controller does not support WTR() print('set wave table rate to {} for wave generators {}'.format(TABLERATE, wavegens)) pidevice.WTR(wavegens, [TABLERATE] * len(wavegens), interpol=[0] * len(wavegens))
Giving the following error:
pipython.pidevice.gcserror.GCSError: Parameter out of range (17).
I have managed to sort of make it work by replacing the
pidevice.WTR(wavegens, [TABLERATE] * len(wavegens), interpol=[0] * len(wavegens))
with
pidevice.WTR(0, [TABLERATE], interpol=[0]))
However, as imagined, it only affects table 0, leaving the other one unaffected. Thus, generating a spiral (TABLERATE = 10).
By printing
pidevice.qWTR()
it returns:
OrderedDict([(0, [10, 1])])
I have not been able to successfully access the remaining axis and edit the other TABLERATE.
I am running out of ideas, does this happen to anyone else?
I have an E727 driver.
Thanks in advance.