Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Testing With Loopback Mode

...

'encoderValue' (shape: 1):  23563414
'timing' (shape: 1):  505870
'scale' (shape: 1):  1
'scaleDenom' (shape: 1): 150
'mode' (shape: 1):  0
'error' (shape: 1):  0
'majorVersion' (shape: 1):  2
'minorVersion' (shape: 1):  0
'microVersion' (shape: 1):  0

Zach writes:

...if the denominator is used, we do no pre or post multiplication of the values. If I need to express something like numerator = 1.16 and denominator = 5.0, I would send 116 and 500 which maintains the same ratio as the original.

In the specific case of this encoder, I send 1 and 150 exactly and your code on the other side simply doesn’t do the *1e-6 step because a denominator is present.

Configuring the Timing System

...

Testing With Encoder Simulator (sim_udpencoder)


Code Block
languagetext
titlesim_udpencoder usage
collapsetrue
$ sim_udpencoder -h
Usage: sim_udpencoder [options]
Options: -r <rate> (0:929kHz,1:71kHz,..)
         -e <evcode>
         -p <partition>
         -d <data port>  (default 5006)
         -v (verbose)
Either -r or -e or -p is required


Testing With Loopback Mode (drp_udpencoder -L <loopback_port>) 

Configuring TPR On DAQ Partition

Code Block
languagetext
titletprtrig
You can get tprtrig to trigger the EVR on a DAQ partition, then sleep, like so:
    $ tprtrig -t a -c 0 -o 1 -d 2 -w 10 -p 4 -z
programs EVR /dev/tpra (-t a) to generate a TTL trigger using logic channel 0 (-c 0) on output 0 (-o 1 [bit mask]) with delay of 2 119MHz clocks (-d 2) and width 10 119 MHz clocks (-w 10) for every L1Accept on partition 4 (-p 4). 

Configuring TPR Standalone

Code Block
languagetext
titletprtrig
Generate 1Hz triggers on output 0 with a width of 54 nanoseconds, then sleep.

    $ tprtrig -t a -c 0 -o 1 -d 1 -w 10 -r 6 -z

...

Loopback Mode

In loopback mode no encoder or PLC or added process is required, as the DRP drp_udpencoder sends and receives simulated data via localhost.

...