Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Run Encoder Sim on Remote Host

...

...we’re currently taking the PLC’s internal encoder numerator, which is a floating point number less than zero, multiplying it by 10^6, and sending it as an integer. So, the “unit” of the output is baked into the protocol.

Data Format 2.0.

...

0

Version 2.0.0 of encoder_channel_t adds a uint16_t field 'scaleDenom.' If nonzero, it is the denominator of a rational scale value.

...

Viewing Encoder Value in AMI

Run Encoder Sim on Remote Host

Earlier (2022) the sim was limited to localhost.


Code Block
languagetext
titleListen on drp-tst-acc01
-bash-4.2$ hostname
drp-tst-acc01
-bash-4.2$ nc  -lvu 172.21.148.201 5006
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Listening on 172.21.148.201:5006
Ncat: Connection from 172.21.148.110.
sim_updencodersim_updencodersim_updencodersim_updencodersim_updencoder



Code Block
languagetext
titleend from daq-tst-dev03
(ps-4.5.26) -bash-4.2$ hostname
daq-tst-dev03.pcdsn
(ps-4.5.26) -bash-4.2$ sim_udpencoder -r 0 -a 172.21.148.201 | head -4
 Version          PulseID        TimeStamp  Markers  BeamReq          BsaInit         BsaActiv          BsaAvgD          BsaDone
   10000       374b0fc41f    3e4f023b73138    10040        0                0                0                0                0 
   10000       374b0fc420    3e4f023b7356d    10040        0                0                0                0                0 
   10000       374b0fc421    3e4f023b739a2    10040        0                0                0                0                0