Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sys.Time Gathering and Gather File Limitations
#1
Hello, I'm having some trouble when trying to gather Sys.Time values into a file.

I'm running a motion program:

gather.enable = 0

Gather.addr[0]=Sys.Time.a
Gather.addr[1]=Motor[2].ActPos.a
Gather.addr[2]=Motor[4].ActPos.a
Gather.addr[3]=Motor[2].ActVel.a
Gather.addr[4]=Motor[4].ActVel.a
Gather.items=5
Gather.Period=1

gather.enable = 3; dwell 0

--motion code---

gather.enable = 0; dwell 0

enable plc GATHERPLC // sends system "gather -u /var/ftp/gather/data.txt"

But when I check the generated data file, the first column values does not match with the values I expected and see for Sys.Time on the Watch window. I tried to change Gather.Type[0] to 5, but I got weird numbers. The rest of the columns are ok with the variables as it was specified. I would like to have Sys.Time value in seconds.

Another problem I'm having is that the full motion program have duration of 51 seconds, and the gather file has only information for the last 12 seconds, it's missing data. Is it beacause of any file limitation size?
Reply
#2
Is this number a large integer? If so it should be a number of servo counts.

You can multiply this by Sys.ServoPeriod/1000 to get time in seconds.
Reply
#3
(03-19-2019, 04:30 PM)Eric Hotchkiss Wrote: Is this number a large integer? If so it should be a number of servo counts.

You can multiply this by Sys.ServoPeriod/1000 to get time in seconds.

Yes, it worked, really thank you.

I still have the issue of the file limitation. Even if a change Gather.MaxLines to a high number (around 1000000), I'm still getting only 16000 lines that are just for the last 3.5 seconds of a 20 seconds motion program I'm running right now.
Reply
#4
Gather.MaxSamples is not used in this mode, and the buffer is used in “rotary” fashion, with new samples overwriting older samples as necessary.

You may need to increase your gather period or lower the number of variables to sample.
Reply
#5
Matheus,

If you're already using a system command to do the gather, try instead system "gather >> /var/ftp/gather/data.txt" (after the gather has already started but before your motion/data to gather occurs) or "gather -w >> /var/ftp/gather/data.txt" (before you issue the gather command--the "-w" will tell the pmac to "wait" for a gather to start).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)