Jump to content
OMRON Forums

How to Read Gather Data Manually in Turbo PMAC


Guest majidy

Recommended Posts

Guest majidy
The content of gathered data can be read from PMAC registers manually and the procedure is described with an example. Example: Gather suggested M variable M164->D:$CC Step 1: Gathering I variables: I5000=0 ;No Wrap Around I5001=$8000CC ;Source address for gathering I5049=1 ;Sampling Period I5050=$1 ;Mask word for only gathering the first source address Step 2: Defining M variables for looking at start of the gather buffer and end of the gather buffer M1000->X:$003120,0,24 M1001->Y:$003120,0,24 Step 3:Define gather End Gath; Del Gath; Define Gather 50 Note: There is a minimum of 48 for the size of the gather buffer, so size 50 means 3 gathering samples. Let say the value of M164 is 2. M164=2. Step 4: Start Gathering Gath; Step 5: Now if we look at the value of M1000 and M1001-> M1000: $2FFCE and M1001:$2FFD1 which means the samples are gathered in registers D:$2FFCE , D:$2FFCF and D:$2FFD0. These values can be read by assigning M variables to them: m1002->D:$2ffCE m1003->D:$2ffCF m1004->D:$2ffD0 m1002=2 m1003=2 m1004=2 Enabling wrap around: If buffer is full and wrap around is disabled no data will be gathered, but by enabling wrap around the data will over written to the existing buffer. Note that “List Gather” does not work when wrap around is enabled, so data should be read manually the same way as described in the above example. To enable the wrap around I5000 should be set to 1 or 3.
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 5 months later...
This is an example for two sources : Example: Gather suggested M variable M164->D:$CC and M264 Step 1: Gathering I variables: I5000=0 ;No Wrap Around I5001=$8000CC ;Source address 1 for gathering I5002=$80014C ;Source address 2 for gathering I5049=1 ;Sampling Period I5050=$3 ;Mask word for only gathering the first and second source address Step 2: Defining M variables for looking at start of the gather buffer and end of the gather buffer M1000->X:$003120,0,24 M1001->Y:$003120,0,24 Step 3:Define gather End Gath; Del Gath; Define Gather 53 Note: There is a minimum of 48 for the size of the gather buffer, so size 53 means 6 gathering samples. Let say the value of M164=2 and M264=3. Step 4: Start Gathering Gath; Step 5: Now if we look at the value of M1000 and M1001-> M1000: $2FFC1 and M1001:$2FFC7 which means the samples are gathered in registers D:$2FFC1 , D:$2FFC2,D:$2FFC3,D:$2FFC4,D:$2FFC5,D:$2FFC6. These values can be read by assigning M variables to them: m1002->D:$2ffC1 m1003->D:$2ffC2 m1004->D:$2ffC3 m1005->D:$2ffC4 m1006->D:$2ffC5 m1007->D:$2ffC6 If we put these M Variables in watch window you get: M1002=2 M1003=3 M1004=2 M1005=3 M1006=2 M1007=3
Link to comment
Share on other sites

  • 2 years later...
[quote='Sina' pid='390' dateline='1272390615'] The following document explains how to decode the data in gather buffer: [/quote] Hi, thanks for the document. However, it seems this procedure does not work for 48 bit float values. This is what I am doing: Variable to gather = P2000 = 0.1 I500x = $C067D0 ($C to gather float values + xxxxx address) The gathered value I get from the UMAC is (hex) 6666666667FC. I use your instructions to decode this hex value, and I get the following int values: Mantissa = 1717986918 Low = 6 Exp = -3 The value, before multiplying (1<
Link to comment
Share on other sites

  • 1 month later...
[quote='majidy' pid='389' dateline='1272390157'] If buffer is full and wrap around is disabled no data will be gathered, but by enabling wrap around the data will over written to the existing buffer. Note that “List Gather” does not work when wrap around is enabled, so data should be read manually the same way as described in the above example. To enable the wrap around I5000 should be set to 1 or 3. [/quote] since the LIST GATHER command does not work with wrapped gathered data (i5000=1), isn't there any other command that does this job? I would prefer to not go deep in retrieving infinite Mvariables.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...