For this you can create a FPScript formula and use the Index Operator  or the Value Index Operator [].
You can also copy a signal range in a diagram to a FPScript formula. Using the Copy Range command on the toolbar or in the Cursors menu, you can copy the section of the curve between the cursors to the clipboard. The command saves a formula in the clipboard, which extracts the section from the curve. When you run the command, a dialog box appears where you can specify whether the current cursor positions should be inserted as fixed values or as variable values.
Index Operator (FPScript)
Value Index Operator (FPScript)
Copying Signal Sections to the Clipboard