bstobie Posted July 22, 2014 Posted July 22, 2014 Hi guys. I am working on a multi-axis system that uses compensation tables for 3 linear axes based on the position of another circular axis that physically rotates the 3 axis system. There is a (hopefully remote) possibility that I might need to switch between tables based on the system environmental temperature. How would I get this temperature data into the PMAC control system? I have a rough idea of using the GPIO connector to input the temperature data, and then using this data in a dummy motor somehow. Any advice on this?
Richard Naddaf Posted July 22, 2014 Posted July 22, 2014 What are the possible signals available from the temperature device? Typically, these are brought in as general purpose +/-10V analog inputs reflecting the working range of the temperature scale. General purpose I/Os can work as well if the number of temperature levels is limited.
bstobie Posted July 23, 2014 Author Posted July 23, 2014 What are the possible signals available from the temperature device? Typically, these are brought in as general purpose +/-10V analog inputs reflecting the working range of the temperature scale. General purpose I/Os can work as well if the number of temperature levels is limited. Hi Richard, thanks for the swift response. We have a temperature monitoring network that could in principle convert the temperature sensor signals (from PT100 type sensors) to parallel digital signals for the GPIO connector. Only a few bits of resolution should be needed. My conceptual problem is in how to then use this data within the PMAC control software framework to initiate changing between compensation tables.
curtwilson Posted July 23, 2014 Posted July 23, 2014 We have had a few users switch between compensation tables based on some variable. Typically this has been done by putting all of the potentially used tables in the PMAC, with the tables not being used writing their corrections to an unused motor (e.g. #32). In your case, you would probably use a PLC program that would look at your temperature value and decide which tables point to your 3 real motors and which tables point to the unused motor. The tricky thing is that this has to be done with pointers (M-variables) and really pairs of pointers used in an indirect addressing method. The pointer to the start of the comp table belonging to motor 1 (which does not need to use #1 for either source or target) is at address X:$3192. So the contents of this register contain the starting address of the table in PMAC's memory. (In a simple test here, that address for me is $02FFF4.) The contents of the X-register at this address are the address of a key register for the target motor. This value should be $89 for Motor 1, $109 for Motor 2, $189 for Motor 3, and so on, to $1009 for Motor 32. So, how to make use of this? First, let's define some M-variables: #define FirstTablePtr M5001 FirstTablePtr->X:$003192,0,24 ; 1st table ptr to start #define FirstTableTarget M5002 FirstTableTarget->X:$0010FF,0,24 ; Dummy address to start ; Pointers to M-variable definitions for indirect addressing #define FirstTableTargetAdr M5012 FirstTableTargetAdr->Y:$00538A,0,24 ; Address of M5002 definition The following command needs to be done once to initialize the pointer: FirstTableTargetAdr = FirstTablePtr Then, whenever you want to change the target motor number of the table, you use a command like: FirstTableTarget = TargetMotorNum * $80 + 9 where "TargetMotorNum" is defined as some general-purpose variable.
Recommended Posts