Jump to content
OMRON Forums

Laser Pulse Control with EQU on PowerBrick LV


Recommended Posts

Hi all,

I'm trying to follow the application note Laser Pulse Control with Power PMAC DSPGATE3, specifically the section Equidistant Pulse Output Per Traveled Distance Along the Path. This involves setting up a virtual motor, custom user servo routine, and PFM + EQU, and I'm trying to implement this on a PowerBrick LV controller. My end goal is to output equally-spaced pulses as the machine moves in X/Y. For example, I want to generate a pulse every 0.8mm traveled.

I'm looking to use an EQU output from Gate3[1].Chan[3], and I'm using Motor 10 as my virtual motor, and I've set the L-variables in the example motor setup code as such.

As the app note example shows, I selected Motor 9 (which has no setup in my code) to run the user-written servo routine. I run the subprogram to set up EQU called PulseAlongPath(GateIndex, ChanIndex, PulsePeriod, PulseHigh) in a Motion Program, and then try to jog the machine in X and Y, however I don't see pulses on the EQU output.

I see that to enable the trajectory following, two conditions should be activated:

  1. Motor using the user-written servo routine needs Motor[x].ServoCtrl = 1
  2. The virtual motor with PFM needs to be closed loop

I'm a bit confused about which motor should be running the user-written servo routine - the app note shows Motor 9, but I'm not sure if I should also use Motor 9 or use a different motor. Also, how to I set the virtual motor to closed loop?



Laser Pulse Control with Power PMAC DSPGATE3.pdf

Edited by rr_seas
Add appnote pdf
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

The user-written servo routine can be any motor other than one of your real motors (an unused motor number).

The PFM setup code in the document already sets the PFM motor to “pseudo” closed loop by virtue of the Gate3 “EncCtrl” set to a value of eight, “Internal pulse and direction CW”.

Link to comment
Share on other sites

Thanks for the reply, Steve.

I finally got it working after some debugging. This is an existing machine and controller that I'd helped build/configure years ago, but then left the company. I'm now working with the same machine years later, trying to add features without breaking the existing working setup.

My issues were as follows:

  • Sys.MaxMotors was set to 9, I needed to set this to 11 to get access to Motor[9] and Motor[10]
  • I didn't have usrcode.c set to "compile" as the build action (right click -> properties)
  • The EQU out on Gate3[1].Chan[3] had some existing motor configuration that was causing strange behavior. I moved to Gate3[0].Chan[3], which was totally unused and worked as expected
  • Had some issues with resets overwriting motor configurations, because I'd forgotten about save/fsave and how the boot process works.
  • I set the virtual motor to closed loop with #10j/ (online) or jog/10 for within motion programs/libraries.

The app note mentioned the steps to enable tracking/pulses should be in order, like:

  1. Enable ServoCtrl on motor running user-written servo
  2. Set virtual motor to closed loop

Because of that, I assumed setting the virtual motor to closed loop meant Motor[10].ClosedLoop should be 1. The method I found of accomplishing that was to use the j/ or jog/ command. However, based on your reply I'm not sure if that is needed, but I'm doing it anyway.

I now have an M-code to configure the pulses, and another M-code to enable/disable pulses, all working as expected.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...