Jump to content
OMRON Forums

Unit101

Omron
  • Posts

    143
  • Joined

  • Last visited

Everything posted by Unit101

  1. Sorry oldest version I have is for VS2005. I have emailed it directly to you. Hope it helps.
  2. Hello, Please see below attached C# VS2010 complete project that demonstrates using both Binary rotary buffer and Ascii buffer to download a motion program continuously to a PMAC. It shows how to load in an example G-code program to a list box, then initialize the PMAC buffer, open it and spool the program to the PMAC. It also shows how to keep track and display to user the current line being executed and track the buffer filling up and being empty. I also have this in older versions of VS if needed. Feel free to contact me directly with questions about implementing this. mesposito@deltatau.com Pcomm2_120409.zip
  3. Hi Luke, Great advice above from Curt and Richard. Yes for sure on any laser cutter I've worked on we had to implement an algorithm running either in Open Servo or Kinematic buffer to offset laser power based on actual cutting speeds... I suggest you look at this post with download for a good idea on doing this: http://forums.deltatau.com/showthread.php?tid=147&highlight=predict+future Search this forum for "Can the PMAC Predict the Future" This shows clearly how to use the kinematic buffer and lookahead to provide very clean way to do your calcs in advance of speed changes and then implement a output such as laser power at exactly the time when it is needed... in other words with the kinematic buffer you can predict the future and have the laser power adjusted at same time as speed and not just follow or react after the speed change. Hope this helps...
  4. Here added details on problem when trying to add a new PMAC device in Pewin Pro2. -issue is when adding the Eth PMAC it won't show up in list after adding it... -Problem is with Win 7 user permissions. -To fix Win7: 1. Control Panel - User Accounts - Select "Change User Account Control Settings" 2. In here Slide the "UAC" slide bar to bottom = "Never Notify" 3. OK - Exit Control panel 4. Now you MUST Reboot the PC.... change will NOT take effect until you reboot. -To add the Ethernet device to PMAC list: 1. Start PewinPro2 - go to Setup - General Setup and Options 2. Select the [Select] button 3. Select a blank slot in PMAC list of devices - e.g. PMAC 00 4. Insert - New - Eth - OK 5. Enter the IP Address for your PMAC 6. Use the "Network Test" button to be sure you can "PING" it ok 7. OK 8. Now it should appear in list of "PMAC devices not registered:" 9. Select the new PMAC from this list - OK 10. Now the new Eth PMAC should be in the list of PMAC Devices 11. you can select this PMAC - OK - and start talking to it
  5. The document and example PLC attached explain and demonstrate how to configure a Copley MACRO amplifier thru the MACRO ring from the PMAC. This allows a PLC to be used to initalize a system amplifier without the use of other software such as CME2. PLC1-Config-Copley.pmc Config-Copley-AppNote.pdf
  6. Document highlights extended features of 85M with Sigma V drives: The document and example PLC attached explain and demonstrate how to configure both the 85M and Yaskawa SigmaV drive parameters thru the MACRO ring from the PMAC. This allows a PLC to be used to initalize a system drive and 85M module without the use of other software such as SigmaWin. Revised 3/2/12 for mistake found in app note. Revised 9/3/12 - Added documentation on how to use "Adjustment Commands" over the MACRO ring with Sigmav drive and 85M. This for example shows how to reset the drive Absolute Encoder to Zero from the PMAC. Example PLC code also included in updated document. Revised 12/24/12 - Document new feature with firmware v1.050 -now can setup to have Drive and Motor status (Mi4, Mi60) brought back to PMAC using the cyclic data transfer in either the Servo or IO nodes -eliminates need to poll the drive status, can simply setup and read the status in PMAC memory - details and examples added to updated doc. below 85M-Config-Sigma5-AppNote.pdf
  7. If using .NET 4 I think issue is that the PIA (primary interop assembly) is set to embedded. Select the contol - properties - make embedded FALSE See this post for details http://forums.deltatau.com/showthread.php?tid=234&highlight=.net Also if going to effort to move to .NET then should not use ptalk and go to pcommserver I be glad to help and provide example code
  8. Below is a cool way to create timers and use them in PMAC code. This works great and makes code readable, concise. //First in your HEADER file make below macros #define Delay1 i6512 #define msec1 *8388608/I10while(i6512>0)Endw //Now in your PLC code you can simply put this line to create a delay // in the PLC Delay1= 1000 msec1
  9. You could use a timer in your plc logic so that it only sends the actual motion command every x milliseconds. Then by adjusting some variable could get the control result with delay that seems to work best. At least 2 ways to use a timer in your code: 1. insert a In Line timer using the While statement in your PLC -this will hold up execution in the PLC for a give time each time it is cycled thru - this is simpler but will prevent all the PLC code from running each cycle, if this is ok it will work fine. ... example of how to create a Inline timer.... #define Delay1 i6512 #define msec1 *8388608/I10while(i6512>0)Endw OPEN PLC 2 CLEAR ;correction PLC - only do correction with M5 is moving in program IF(M900 = 0) #5J/#6J/ Endif IF(M900 = 1) P0 = M161/(I108*32) P1 = M162/(I108*32) P2 = M261/(I108*32) P3 = M262/(I108*32) P4 = P0-P1 P5 = P2-P3 P6 = P4*-52 P7 = P5*52 M572= P6 M672= P7 Delay1= 1000 msec1 ;this will hold up execution for 1 second CMD"#5J=*#6J=*" Endif 2. Create in a separate PLC a timer/counter with some Millisecond rate, so that every so many milliseconds it increments a counter variable. Then in your PLC set this counter value to 1 which activates it in the the timer plc and each time thru your PLC look to see it increment, when it is at or above some value you want to delay, set it back to 1 and do what is needed in your PLC. This will allow the whole PLC to run every time but the desired logic to delay will only happen when at some timed rate of x milliseconds.
  10. Great... Congrats on success. you are very welcome, and we hope your project is a big success. Regards, mike
  11. Answers to Questions: 1. how to make the PLC program to loop ? -PLC's loop by nature of how they work, if a plc is enabled in the pmac once each scan of the PLC's the logic in the plc will be executed. -if the plc has a while loop for other blocking statement it will run to that logic and next time start at that point -PMAC PLC's work just like traditional PLC's in other controllers -please refer to the user manual for details and basics of PLC use -also note that once you give the jog command J=* it will run until the motor reaches the destination, you don't have to keep sending the command over and over, unless you want to update the destination each time 2. but motor 5 and 6 can't jog. ?? -make sure the MOTORS 5 & 6 are NOT defined in the CS -if they are in the CS ($1#5->1A) as the A or B axis then they will not be able to JOG while the CS is running a Motion program -this is true even if they are not moving or commanded to move -if they are in the CS while it is running a program direct jogging is not allowed so they will ignore any jog commands in the PLC at this time Other Idea... -So I think you want to: -NOT have Motor 5 and 6 defined in the CS with other motors -Have a PLC that runs logic when needed to move motors for correction during a program -So likely you want to have some flag varialbe that when is true tells the PLC it is time to do M5 correction -might look like this: -so now the PLC with M5 correction will only run when M1 in program is doing a move Undefine All &1#1->1X I5=2 Enable PLC 2 &1B222R Open Prog 222 clear Linear Inc M900 == 1 ;tell PLC2 now to run correction with M5 X1000 F250 ;make program move with M1 M900 == 0 ;turn off correction with M5 close OPEN PLC 2 CLEAR ;correction PLC - only do correction with M5 is moving in program IF(M900 = 0) #5J/#6J/ Endif IF(M900 = 1) P0 = M161/(I108*32) P1 = M162/(I108*32) P2 = M261/(I108*32) P3 = M262/(I108*32) P4 = P0-P1 P5 = P2-P3 P6 = P4*-52 P7 = P5*52 M572= P6 M672= P7 CMD"#5J=*#6J=*" Endif CLOSE
  12. Ok makes sense. But I'm curious why does A have to be a different Feedrate from X ? -you want it to get done quicker ? Why not just move A commands to the PLC where you are calc it's correction moves ? So in the PLC you can just command A with a jog command... and set the jog rate I522 = the speed you want it to move... I see no reason why A has to be in the CS with X ? If it does... for other moves this could be done with a Phantom motor and have Motor 5 follow it then disengage when not need to follow. --- So remove Motor 5 from CS. --- In your PLC add lines to Jog it #5J=P6
  13. Can you give us more details of what trying to accomplish ? Do the X and A axes need to start move at same time ? Do they need to finish each move at SAME time ? Why different feedrates for X and A during the move ? Here is Example to run SAME motion program in 2 CS at same time : &1#1->1X ;now motor 1 is X axis in CS1 &2#5->1X ;now motor 5 is X axis in CS2 Open Prog 3 clear close Inc Linear X1000 F(Q1) ;Q1 can be different value in CS1 and CS2 see manual Close &1B3R&2B3R ;here start both CS1 and CS2 to run same program -this will run same program in both CS1 and 2 and use different feedrate Q1 for each, they will not be coordinated and motors will not be done with moves at same time... Here is Example to run different moves in different CS like Prog 3 you show. &1#1->1X &2#5->1A Open Prog 3 clear ... X1000 F1000 Close Open Prog 4 clear ... A16383 F500 Close &1B3R&2B4R ;will start programs at same time but may be done at different time --here you are running different feedrates in different CS and starting them at same time, but they are not coordinated with each other. --- to coordinate between CS programs you could have some Flag variables that hold up execution in the motion program until they are set, and they are set by each CS as it completes a move... --But I don't think any of the above examples help to solve your problem... they just answer the questions. Give us a bit more detail of what you are trying to accomplish and maybe there is a better way to get it done. Feedrates are usually a result of some Vector calculation so that each coordinated axis will run at a different velocity so as to start and stop at same time - they move together. It might be that you do NOT want motor 5 A axis to be in the CS since you want it to start with X but not run at same rate to it's destination... you may want to have motor 5 controlled by a PLC outside the CS and have a flag that is set in the motion program when you want Motor 5 to make a move, and it can then do so at it's own Jog rate. So it can start with M1 in the program but run on to it's own endpoint at it's own rate. By using flag variables you can get some coordination between the CS1 program and the Seperate Motor 5 A axis as needed. Thanks... mike
  14. You show this logic to download your file: I try pmacDevice.Download(dwDevice,"MOTIONPROG1.pmc", bMacro,bMap,bLog,bDnld,&pbDriverOpen). BUT your pdf screen shot shows the file was read and compiled ok BUT it was not downloaded. I suspect that your bDnld is set to FALSE in your function call ? If bDnld is false it will compile as you see but not actually download or send the results to the pmac. regards, mike
  15. Unit101

    SENDP

    Ahhh... the plot thickens... -yes I understand the issue with PServer and byte size, as I think you see you can force it to "send immediate" if you wish, this will cause it to pad the packet and send right away... this is needed when for example using the rotary buffer and you get to the end, must send the last line of buffer code as "send immediate" true so it will flush the end of buffer... --- but I have found you can't just send every line like this or you may get some lockup after a few 100 lines being sent ---if you got Andy on it you got the top man and he will get to the bottom for you app for sure... but I'm very interested in the solution and helping if I can, I do a lot with PServer and HMI stuff so am always looking for a better way or different way to do same thing that for some apps works better.... --- I assume you are using DPRam ? -I'm not sure how fast this will work but if you were putting the values needed in DPram then you can read them on your HMI side using DPRam calls to Pserver instead of individual calls like GetResponse .... -PServer in this case is handling the xfer of dpram from pmac side to pc side for you ... but I'm not sure at what rate ?... but maybe faster than needed ??? So is it possible to setup all your data xfer in DPram to get positions and states or register values ? -if sending down moves that are being dynamically created in PC can also using the Binary Rotary buffer which runs thru DPram --- So not sure I can help much more but maybe I can run some tests or help push to get a solution... Regards, mike
  16. Unit101

    SENDP

    Hi RHOM, Like Sina I installed your exact code directly to my Brick and it runs fine. I get the "A String" msg in the UnSolicited Response and see P2900 counting up as expected. If you want to call or email me I'd be glad to give you some one on one support with this... -we can make sure you have proper pewin and setup correct -i can send you my ivar settings to compare -I also have a complete Visual Studio Example HMI program that has step by step details and example how to use PMAC events including the UnSolicited event so that your PMAC can send messages to your HMI, I'd be glad to share this with you as well. So feel free to contact me directly: Mike Esposito 919.435.1159 mesposito@deltatau.com
  17. Thanks Steve 1. for quick response and 2. memorizing all the manuals... you were exactly right, it is clear in the user manual I just did not find it. Here is some of the text from Turbo User Manual pdf pg68: -I put this here for others that may have the same question... The SLCK frequency must be at least four times higher than the maximum encoder cycle (line) frequency input, regardless of the quadrature decoding method used (with the most common times-4 decode, the SCLK frequency must be at least as high as the count rate). In actual use, due to imperfections in the input signals, a 20 – 25% safety margin should be used. The default SCLK frequency of 9.83 MHz is acceptable for virtually all applications. It can accept encoder signal cycle frequencies of up to about 2 MHz (8 MHz count rates) – with safety margin – and still provide decent digital filtering. This frequency may be changed by factors of two, up to 19.66 or 39.32 MHz on most designs, or down to as low as 1.25 MHz or 306 kHz on most designs. On some designs, an external SCLK signal can be provided. If very high encoder count rates are required, the SCLK frequency may have to be raised; if better filtering is required to prevent count errors, the SCLK frequency may have to be lowered.
  18. What is max quadrature encoder input rate for the Clipper ? 10KHz ? 50KHz ? Does this rate vary with other PMAC products ? Thanks, mike
  19. Hello Wayne, Yes you should have Admin rights. Also you must turn off the UAC (user access control). Google search "Disable UAC" for info on how to do this. If UAC is not disabled it will act just like you see, the USB is visible and available in device manager but will not get added to the PMAC list when you select. You say Ok and it just goes away with nothing done.
  20. Hi Islay, 1. You can find details on the response in Pcommserverpro2.pdf manual on PDF page 27 under heading "Error Handling - ASCII Communication And Other Functions" it has a chart showing all the error codes. Regards, mike
  21. 12/1/10 updated the document -now 2 sections showing setting up of Phantom or Virtual motors 1. Setup group of Virtual motors on system for testing 2. Setup a single "Phantom" motor to work in a system alongside of real motors. Both are similar but can make it easier to implement depending on your need for virtual motors. The first section includes example from another post by Richard showing code to setup 8 virtual motors on a Brick.
  22. Here is an example showing one way in VS6 C++ to make the GetResponseEx call and get the response. CString command; CString response; long status; BSTR MyBstr = SysAllocString(L"1"); int progRunMvar; progRunMvar= GetPrivateProfileInt( "Settings", "progRunMvar", 10, BaseDir ); char charBuf[10]; itoa(progRunMvar,charBuf,10); command = "M"; command += charBuf; //command = "M5180"; //tay101 CString str; do { //here we will loop as long as the Mvar we look at is still 1 //-this tells us that the CS is still running the program //-we wait here till the program is done Sleep(10); pmacDevice->GetResponseEx (dwDevice,command,0,&MyBstr,&status); Sleep(10); response = MyBstr; response = response.Left (response.GetLength() -1); //strip null char from end } while (response != "0");
  23. Good Day Islay, You could also look at the examples in C# sent and see examples of details when using the functions. The syntax is different but calls and responses to the Pcomm functions are the same. Also look at the PcommServer manual Page 12 under "Using the Reference to PcommServer in VB.NET" it shows GetResponseEx being used with the return response as a string... Below you ask: I don't unstand what is in the pAns (answer). pAns is a String with PMAC response - it can be string data or empty depending on the question or command sent, in your example I think you are sending a empty command so getting a empty pAns. Then you show this example code: Quest = Question; sprintf(Question,"I8000"); pmacDevice.GetResponseEx(dwDevice,Quest,bAddLF,pAns,&DPSuccess); The above example I think is bad, I don't see all the code so am not sure what the value of "Quest" actually is ? However it appears you want it to be "I8000", but the above code sets "Question" to "I8000" not "Quest" ? So perhaps you are passing the command "Quest" which is empty to pmac so in return the pAns is also empty. If in above example you did send "I8000" as the question the pAns would be a String return with the current value of I8000 in the PMAC. Some commands sent to PMAC will result in a empty return string. For example if you send the "#1j/" command the return would be empty string unless there is a error then it might return "ERR018" or something similar.
  24. Unit101

    % Feedrate

    Hi Steve, I apologize for the hassle but this thread has become a mess. And it was pointed out to me that I got it all started by mis-reading your original question - you said M5198 and I Saw I5198, both related to your feedrate issues but not the same. And now we have got the issue on another tangent with Kinematics and your motor Feedrate being too high. I think this thread will be killed and removed since it now just serves to confuse anyone that reads it. Please send me a email directly or call and we can pick up and get back on track. Or if you wish just post another question on the forum and we can start over. Thanks, mike mesposito@deltatau.com 919.435.1159 12/1/10 update - Steve and I worked on this issue with TeamViewer and resolved the problems - main problem was that I5113=0 and must be >0 for Kinematics.
  25. Unit101

    % Feedrate

    What is your axis scale factor for the CS ? #1->????X What is the timebase for your CS ? I5190 = 1000 = seconds Remember your Feedrate command is going to be the scale factor * counts / timebase units. So if you have a scale factor of 10 and time base of seconds a feedrate of 100 = 1000 counts / second Try setting your Feedrate command to a very low value and see if it works. Try setting your I5198 to low value and see if it works. Also look carefully at the Kinematic Subroutines, in here the scale factors could also be mis-applied and giving you some big value that the motor cannot achieve. In fact to prove it is not in Kinematic, turn this off and just run it as a normal motor. If it works then issue is in your Kinematic routines.
×
×
  • Create New...