aTURBOPMAC2USER Posted April 4, 2014 Share Posted April 4, 2014 Hi, I use the position compare to collect some data, the main codes are: 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? Link to comment Share on other sites More sharing options...
curtwilson Posted April 4, 2014 Share Posted April 4, 2014 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? Link to comment Share on other sites More sharing options...
aTURBOPMAC2USER Posted April 21, 2014 Author Share Posted April 21, 2014 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. Link to comment Share on other sites More sharing options...
curtwilson Posted April 21, 2014 Share Posted April 21, 2014 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. Link to comment Share on other sites More sharing options...
aTURBOPMAC2USER Posted April 27, 2014 Author Share Posted April 27, 2014 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 Link to comment Share on other sites More sharing options...
curtwilson Posted April 28, 2014 Share Posted April 28, 2014 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. Link to comment Share on other sites More sharing options...
Recommended Posts