How to export the P-variable? aTURBOPMAC2USER Junior Member Posts: 24 Threads: 9 Joined: Mar 2013 04-04-2014, 01:59 AM (This post was last modified: 04-04-2014, 02:17 AM by aTURBOPMAC2USER.) Hi, I use the position compare to collect some data, the main codes are: Code: ```P552=M152  //M152 is the state of the pulse which generated by position compare; P501=4501 OPEN PLCC 1 CLEAR     IF(L152=1)         IF(P552=0)             P500=...             P(P501)=P500             P552=1             P501=P501+1         ENDIF     ELSE         IF(P552=1)             P552=0         ENDIF     ENDIF CLOSE``` When the motor moves some counts (100 counts), then M152 flip from 0 to 1, so if there is a rise edge of M152, then a value assigned to P500, and P500 is assigned to P4501. Usage this mathod, I collect some data, and assigned them to P4501,P4502,...,P5000. After the motor stops, these P-variable is uploaded to the upper computer, and the upper computer plot a figure from the P-variable. But when change velocity of the motor, namely, change velocity from 30000 to 45000, the figure plotted by the upper computer and the PMAC Plot Pro2 (using P500) is different. I'm very puzzling about this problem, so I want to compare the values of P-variable the code generated and the upper compare received. Is there any way to export the values of P-variable, namely, P4501...P5000, to a excel or txt file from the PEWIN32PRO2? P.S. Can any one give some advise about the problem? curtwilson Delta Tau Insider Posts: 659 Threads: 0 Joined: Jun 2008 04-04-2014, 11:39 AM (This post was last modified: 04-08-2014, 03:34 PM by ***.) In the Terminal Window of the Executive, issue the command "P4501..5000". You will get a 500-line response. Highlight the entire 500-line response with your mouse. Right-click and select "Copy". Open Excel and select the cell where you want the first value to go. Hit CTRL-V. As to your fundamental issue, at higher speeds, at the high speeds, are you able to catch every compare pulse? aTURBOPMAC2USER Junior Member Posts: 24 Threads: 9 Joined: Mar 2013 04-21-2014, 04:28 AM (04-04-2014, 11:39 AM)curtwilson Wrote: As to your fundamental issue, at higher speeds, at the high speeds, are you able to catch every compare pulse? Hi, curtwilson, thanks for reply. Unfortunately, it can't catch every compare pulse in a higher speed of my project. Then I enlarge the counts of every compare, so the pulses aren't lost in the test program. Best regards. curtwilson Delta Tau Insider Posts: 659 Threads: 0 Joined: Jun 2008 04-21-2014, 10:02 AM You have your algorithm in a background PLC program. You may want to move it into a foreground PLC program (PLCC0) with I8=0, or even an Open Servo algorithm for an additional virtual motor to get it to run at a higher update rate. I don't know if that will make enough of a difference for you. aTURBOPMAC2USER Junior Member Posts: 24 Threads: 9 Joined: Mar 2013 04-26-2014, 09:54 PM (04-21-2014, 10:02 AM)curtwilson Wrote: You have your algorithm in a background PLC program. You may want to move it into a foreground PLC program (PLCC0) with I8=0, or even an Open Servo algorithm for an additional virtual motor to get it to run at a higher update rate. I don't know if that will make enough of a difference for you. Hi, curtwilson, PLCC0 is so precious that it will be used for some other application. But the open servo method..., er, may be PMAC's advanced application, can you present a simple example? P.S. My PMAC is: Turbe Ultralite PCI + MACRO16 axis + ACC24E2A curtwilson Delta Tau Insider Posts: 659 Threads: 0 Joined: Jun 2008 04-28-2014, 10:52 AM An Open Servo is really just a PLCC 0 that executes under the servo interrupt instead of the real time interrupt. Look at the User's Manual chapter on Servos for instructions on how to set it up. « Next Oldest | Next Newest »