You can use a timed interrupt in a subroutine to retrieve the analog value every 5 seconds.
Main Program
LD SM0.1 First scan memory bit
CALL 0 Call subroutine 0
END
SUBROUTINE:
SBR 0 Begin subroutine 0
LD SM0.0 Always on memory bit
MOVB 5000, SMB34 Set timed interrupt 0 interval to 5 seconds
ENI Global Interrupt Enable
ATCH 0, 10 Attach timed interrupt 0 to Interrupt routine 0
RET
Interrupt Routine:
INT 0 Begin Interrupt
MOVW AIW4, VW100 Sample AIW4
RETI Terminate interrupt routine
To store the 100 samples I suggest you use Add to Table, I will let you work that part out after testing this code to verify it will work. My Disk 1 of Micro/Win is bad and I dont have it installed now to verify this code but I am sure it will work. Maybe one of the more experienced programmers will offer their opinion now.
Y'all were correct, this STL does make it easier to write than ladder, once you halfway understand the terms and how they are used.