Motenc-Lite Output
- meisu
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
01 Oct 2010 03:20 #4463
by meisu
Motenc-Lite Output was created by meisu
I just installed a new Motenc-Lite board and installed EMC2. I'm not using the CNC software that comes with EMC2 because I'm not running a CNC mill. Right now, all I'm trying to do is put out a sine wave from the Motenc-Lite board. So, I set up a hal script to link siggen.0.cosine to motenc.0.dac-00-value. I can measure motence.0.dac-00-value with halscope and it shows the proper waveform. However, none of the pins are exhibiting this waveform. Obviously, I am loading the Motenc driver in hal with the command:
loadrt hal_motenc
I am far under qualified to write a driver myself. So, if someone could point out my stupid mistake that would be fantastic.
Thanks,
Peter
loadrt hal_motenc
I am far under qualified to write a driver myself. So, if someone could point out my stupid mistake that would be fantastic.
Thanks,
Peter
Please Log in or Create an account to join the conversation.
- ulda
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
01 Oct 2010 12:49 - 01 Oct 2010 12:50 #4467
by ulda
Replied by ulda on topic Re:Motenc-Lite Output
Hi Peter
The dac write function has to be registered, did you do
The gain and offset has to be set, too. Did you do
Hope this helps.
/ulda
The dac write function has to be registered, did you do
addf motenc.0.encoder-read servo-thread 1
addf motenc.0.dac-write servo-thread 1
The gain and offset has to be set, too. Did you do
setp motenc.0.dac-00-gain 1
setp motenc.0.dac-00-offset 0
Hope this helps.
/ulda
Last edit: 01 Oct 2010 12:50 by ulda.
Please Log in or Create an account to join the conversation.
- meisu
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
01 Oct 2010 13:40 #4468
by meisu
Replied by meisu on topic Re:Motenc-Lite Output
That was it. Thank you. By the way, in order for it to work, I had to take off the 1 from the end of the code you gave me. As in:
addf motenc.0.adc-read <mythread>
#and also
addf motenc.0.dac-write <mythread>
What was that 1 for?
addf motenc.0.adc-read <mythread>
#and also
addf motenc.0.dac-write <mythread>
What was that 1 for?
Please Log in or Create an account to join the conversation.
- ulda
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
01 Oct 2010 15:13 #4472
by ulda
Replied by ulda on topic Re:Motenc-Lite Output
If I recall correctly it is for putting this function to be executed first and not last.
/ulda
/ulda
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.059 seconds