paison Posted March 20, 2017 Share Posted March 20, 2017 Hello: When pmac has only one coordinate system, what is the difference between p variables and Q variables in use? I found that Q variables often switch between 0 and the specified value, I would like to know what is the cause, how should I avoid this problem, Q variables can be used in PLCC0? Link to comment Share on other sites More sharing options...
steve.milici Posted March 20, 2017 Share Posted March 20, 2017 This may be a result of not specifying the correct CS within your PLC. Where are you seeing the values switch? Link to comment Share on other sites More sharing options...
paison Posted March 21, 2017 Author Share Posted March 21, 2017 Thank you for your reply, I see in the PWINPRO32 variable watch window, my system only specifies a coordinate system. Link to comment Share on other sites More sharing options...
steve.milici Posted March 21, 2017 Share Posted March 21, 2017 You must specify the CS in the watch window. Link to comment Share on other sites More sharing options...
Omron Forums Support Posted March 22, 2017 Share Posted March 22, 2017 As for your other question, Q variables function the same as P variables when there is only one coordinate system. Link to comment Share on other sites More sharing options...
paison Posted March 24, 2017 Author Share Posted March 24, 2017 i think Q variable and P variable function is different, even if there is only one coordinate system, q variable and coordinate system closely related Link to comment Share on other sites More sharing options...
steve.milici Posted March 24, 2017 Share Posted March 24, 2017 Q-variables, like P-variables, are general-purpose user variables – 48-bit floating-point variables at fixed locations in memory, with no pre-defined use. However, the register using a given Q-variable (and hence the value contained in it) is dependent on which coordinate system is utilizing it. This allows several coordinate systems to use the same program (for instance, containing the line X(Q1+25) Y(Q2), but to have different values in their own Q variables (which in this case, means different destination points). See page 244 (260 electronic) of the “TURBO PMAC USER MANUAL” in the section “Q-Variables” for further details. Link to comment Share on other sites More sharing options...
Omron Forums Support Posted March 24, 2017 Share Posted March 24, 2017 Also, there are a few PMAC functions that use Q-variables and so can overwrite values. These Q-variables are Q0 thru Q19, and Q100 thru Q127. If you are using ATAN2, Read, or kinematic subroutines, some of those variables would have this problem. See under "Special-Use Q-Variables" in the Turbo User manual. Just to be sure, I guess I should point out that Q-variable settings are lost with a power cycle or reset if they are not saved, unless battery backed memory is being utilized. Link to comment Share on other sites More sharing options...
rorcon Posted March 31, 2017 Share Posted March 31, 2017 I doubt that this is what you are dealing with but, I would make sure that I68 "Coordinate System Activation Control" is set to 0. regardless of how many coordinate systems you are using; PMAC allocates the Q variables according to I68. Also note: that P variables P0-32 and P101-132 can be special purpose variables also. Also note that some values may dither in PEWIN due to an occasional corrupted communication. Link to comment Share on other sites More sharing options...
Recommended Posts