Jump to content
OMRON Forums

jackvoxel8.com

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by jackvoxel8.com

  1. I am working with a cartesian system, and need my tooltip to follow a slight curve. To accomplish this I am using a 2D CompTable where the X and Y motors are inputs and the Z motor is the target. I set up the table and jog around and everything seems fine. However when I am executing a motion program I get Y motor skips indicating too fast of moves (I am using steppers) whenever I command fast moves in Y and Z at the same time. The commanded move speed is lower (but close to) the max move speed of an individual motor. Why would this be? Seeing as the target motor is Z I would expect Z to move too fast if anything does. How can there be an effect on the input motors when using a comp table? Let me know if any other information is needed.
  2. Thanks for testing Brad. I confirmed that our HMI and PLCs are in sync. I wonder if some code we wrote broke this? Do you know how M0 works with the HMI to pause? If I look at the implementation it calls `stop` which should not be resumable, but somehow cycle start in the HMI starts mid print.
  3. I am having some trouble using M0 inside my program. Here are some example NC files demonstrating my confusion: Works as expected: G1 X0.1 F1 M0 G1 X-0.1 F1 Works as expected: G1 X0.1 F1 M0 G4 F1 Does not work as expected: G4 F1 M0 G4 F1 Does not work as expected: G4 F1 M0 G1 X0.1 F1 On the two cases that do not work as expected, the UI reacts as I would expect: the status bar says it is IN FEED HOLD, the cycle start and abort button are highlighted and the feed hold button is flashing. However clicking cycle start does not continue the program. (The status says RUNNING and the Feed Hold button does become highlighted again) The above simple programs are just dummy programs but I have a real application that has been exhibiting this behavior. Any insight would be helpful.
  4. I am trying to trigger off of encoder position, not off of the analog input. I've been reading through the User's Manual trying to figure out how to solve this, and I think a Capture/Compare Interrupt Service Routine might be what I need (p796) Do you have any experience with those?
  5. Thanks for the insights curtwilson. In addition to periodically calling fsave, do you know of any way to call fsave immediately before shutdown?
  6. I am trying to generate a CompTable with an analog distance sensor I have mounted to my gantry. My goal is to command a continuous move along one axis, then get readings from my analog distance sensor at set distances along that move (say every 20mm). Ideally I would like to put these readings directly into the CompTable array (after some transformations to convert raw sensor readings to motor counts). I currently have a PLC that simply loops, looks at current position, and records the sensor value when current position is equal to desired position. Is there a simpler or more automated way to accomplish this?
  7. I wrote a PLC to track the lifetime distance of all axes in my system (for more details see this post: http://forums.deltatau.com/showthread.php?tid=2635). I want to persist those values across powercycles/resets. It was suggested to me to use fsave/fload for this purpose. My plan is to add fload to an initialization PLC, and write a new PLC that calls fsave every 30 seconds or so. I haven't been able to find much information on fsave. Is it OK to call it this often? Can I call it more often? Is it OK to call it while also executing a motion program? I would appreciate any insight from people who have experience with this situation.
  8. @AAnikstein This is no longer working for me, anything else I can do to be able to save my firmware to flash?
  9. @AAnikstein Your solution worked. Do you know why I would have to do something like that?
  10. I am currently using a Cam Table to adjust the position of one of my axes while it is executing coordinated motion. (I am simply adjusting the PosBias parameter to nudge the axis in different ways). I am also sometimes using a CompTable to adjust the same axes. However it seems when I use the CompTable then my CamTable action no longer works. Is this expected behavior? Is there any way to get both to work at the same time?
  11. I am experiencing a weird issue, not sure if it is a bug or not. I am currently using a CamTable to apply a constant offset to to one of my axes. I am using CamTable[0].PosBias to adjust the position "on the fly" and I am using CamTable[0].SlewPosOffset = 0.1 as the slew rate. See this thread for more details on how I set this up: http://forums.deltatau.com/showthread.php?tid=2636 However if the PosBias is non 0 then incremental jogging does not work at all as expected. Lets say the PosBias is set to 200 If I call "j^*" with a ProgJogPos set to 100 then I end up moving +300 motor units If I call "j^*" with a ProgJogPos set to -100 then I end up moving +100 motor units It appears the PosBias value is being added to the jog before it is executed. Is this the expected behavior? j^* is supposed to move from the "actual" position, so I would not expect this to happen. Is there any workarounds to get my desired behavior?
  12. I am struggling to save my code to flash memory. Here are the steps I am taking: From the terminal: "$$$***" to reset to factory defaults Right-click on PPCNC_ProjectSource in the Solution Explorer and select "Build and Download All Programs" From the terminal: "save" to save to flash The results seem to indicate the save worked: Successful: SaveConfiguration using /var/ftp/usrflash/Project/Configuration/pp_save.cfg Successful: SaveCustomConfiguration using template /var/ftp/usrflash/Project/Configuration/pp_custom_save.tpl SaveToFlash: Do NOT Power off until Finished!!! availabe_space = 290912K 2524K required_space = 2524K SaveToFlash: cp SaveToFlash: sync() SaveToFlash: mount SaveToFlash: Finish SAVING to Flash. Save Complete However if I reboot the machine my code is not loaded. Also if I factory reset and then normal reset ($$$*** then $$$) my code is not reloaded. Can anyone point out what I am doing wrong? I thought this was the exact procedure I followed on my other PowerBrick and it seemed to work there.
  13. Lets say I have the following ptr definition: ptr valve1->PowerBrick[0].GpioData[0].16.1; If I want to manipulate that IO port in the NC interface I need to figure out which M variable the pointer is stored in and then create a Device Member with that M variable as the getter and setter. Now if I build the code on slightly different hardware or with a slightly different configuration then that M variable number will change. Is there any way for me to select the number that the pointer will be stored under, so I can make sure my code works in different configurations? If not, is there any way for me to manually define a P variable that points to the pointer? (i.e. P8001 -> addressOf(valve1)) NOTE: I know it is possible for me to define the getter/setter in the devices.xml and then make a custom xml file for every machine, I am trying to avoid having to do that.
  14. Thank you Clopedandle, this is exactly what I was looking for. I can confirm it is working for me. I have a few more questions about background programs: 1) Using your method I can stop the program from another program by writing to the break condition variable. Is there any way for me to start the program from another program? (I am currently using the Task Manager to start it) Similarly, is it possible for me to query the current Running/NotRunning status? 2) I see you used the "pshm->P[GlobalVar]" to read and write Global variables. What is the difference between using that and the "SetGlobalVar" and "GetGlobalVar" functions? 3) How low can I safely push the time in "MySleepSec"? (currently set to 0.1) 4) Do I have to worry about reading a corrupt value of the global var from another program or are reading/write atomic?
  15. Hi Steve, I have succeeded in getting my serial device connected to my power pmac controller. I can run my C Background Program if I go to the Task Manager, select the PLC tab, fund my application and click "Start". After doing this I can see the expected output from my serial device in the Unsolicited Messages. Ideally I would have this C program constantly running and dumping the latest serial message into a variable (my serial device is a laser distance sensor). Then from a motion program or normal PLC I could just read this variable to get the latest distance reading from my attached serial device. Is this possible? Do I have to worry about locking to precent reading from the variable at the same time my program is writing to it? Would it be OK to have this C background program running on essentially an infinite loop? I would like to keep the serial device open and not open/close for every reading. Here is the current background program: // Includes #include // Global Gp Shared memory pointer #include "../../Include/pp_proj.h" #include "../../Libraries/serialportcomm/serialportcomm.h" #include // Global Rt/Gp Shared memory pointers // Definitions // Can change this if you expect a longer response from the serial device #define EXAMPLE_CODE_RESPONSE_MAX 256 // Prototype(s) int ReadExampleDevice(char *Port); // This is the main executable location int main(void) { InitLibrary(); ReadExampleDevice(USB1_Port); CloseLibrary(); return 0; } //************************* // Application code snippet //************************* // Global Variables int SerialPort; // This routine will break into Linux scheduling when called. // USB serial ports use the Linux scheduler, not Xenomai RTOS. // Nothing that needs complete determinism should call this routine. int ReadExampleDevice(char *Port) { static const char *SampleCommand = "%01#RMD**\r"; char msg[EXAMPLE_CODE_RESPONSE_MAX]; int ret; // Initialize the serial port. // "/dev/ttyUSB0" is where Power PMAC maps the USB-to-Serial device // The second number is the baud rate. Here are some example baud rates: // B9600: 9600 baud // B38400: 38400 baud (the default for talking to a Turbo PMAC) // B115200: 115200 baud (the default for talking to a host PC or to another Power PMAC) SerialPort = OpenSerialPort(Port,B38400); // Change your baud rate to what you need. To talk to Turbo PMAC, use 38400. // Note: If you want to use this to talk to Turbo PMAC, I1 should be set to 1 on the PMAC to disable CS handshaking // Otherwise, Turbo will wait until it gets the CS signal to send characters //Check return code to see if the port opened properly. if(SerialPort < 0) { Send(1, "Problem opening port!"); return SerialPort; } else printf("Serial port opened properly.\n"); //Write out the command to read display on meter... ret = write(SerialPort, SampleCommand, strlen(SampleCommand)); //If write() does not return the requested number of bytes to write, we have a problem. //Pass return code on to the calling routine. if(ret != strlen(SampleCommand)) { Send(1, "Problem writing to port!"); // Send to PPMAC's Send1 port return ret; } //Read back the string into the "msg" buffer... ret = ReadSerialLine(msg, EXAMPLE_CODE_RESPONSE_MAX, '\n', SerialPort, 10.000); if(ret) { Send(1, "Did not get a response from port!"); // Send to PPMAC's Send1 port return ret; } //Echo Response to Power PMAC send port Send(1, "Response:"); // Send to PPMAC's Send1 port Send(1, msg); // Send to PPMAC's Send1 port close(SerialPort); return 0; // All went well; return good status code. }
  16. Thanks Eric, pointing me to the isnan() function was helpful.
  17. I have a PLC that sets the value to 0/0
  18. I have some code that sets some P variables to the "magic value" of 0/0. Does anyone know what that means?
  19. For the machine I am building I am developing a few motion programs that are often used and reused as utilities. Specifically, other NC programs that my end user will write and run should be able to call my motion programs. I am wondering what are the pro/cons of developing these motion programs as custom MCode, volatile subprograms, or non-volatile subprograms (or something else that I have't thought of) Goals: * Must be able to be called from NC files that are run through the NC interface * Sub programs should be written in motion program format including GCodes. * Fairly easy for me as a machine integrator to see and update the subprograms * Ideally would be nice to call them with easy human readable names instead of program numbers (nice to have if possible) Thoughts?
  20. Ok for some reason it worked today when I tried to download it. Thanks for the pointer this looks like exactly what I need.
  21. I am getting the following error both when I paste in your link and when I manually navigate to the PDF through the filedepot "File does not exist. Make sure you specified correct file name."
  22. I have a Power Brick controller with an RS-232 port. It the documentation it says: "In general, this port should not be used to communicate to external peripherals, but rather left in case of the need to debug." Which tells me there is _some_ way to actually use it to communicate with external devices. Does anyone have experience doing this?
  23. Ok so here is some pseudocode to accomplish what I think you all are telling me: oldTime = currentTime currentTime = GetTime() timeDelta = currentTime - oldTime velocity = GetAxisVelocity() distance = velocity * timeDelta totalDistance += distance I would then run that loop in a PLC as fast as possible and it should have no effect on performance? Let me know if I am missing something.
×
×
  • Create New...