Open main menu

Changes

m
{{Note|AI assistance was used in writing this page for improved formatting and readability, as well as in the process of finding information, testing, and analyzing firmware dumps and backups.}}
 
All files used and mentioned are found on the official Optima XR220amx Application Software and Linux OS DVD 5406106-10 Rev3, which i cannot provide due to being copyrighted content.
<br />
==Purpose and Motivation==
*The detector silently drops any packet with a SeqId it has already processed, so never reuse one.
== Script Download ==
The detector does not have fixed acquisition commands. Instead the host
example IDC_URP_SE_2200.xml for single energy, 2048 by 2048).
=== The GENERIC_SCRIPT command ===
A script is sent to the detector with the GENERIC_SCRIPT command, cmd_type 5.
{| class="wikitable"
! Offset !! Size !! Field !! Meaning
|-
| 0 || 2 LE || scriptID || the slot the script is stored in
|-
| 2 || 2 LE || repeatCount || 0 = run once, 65535 = loop forever
|-
| 4 || 4 LE || repeatEvent || event ID that breaks an infinite loop (0 if unused)
|}
header is exactly 8 bytes.
=== Packed command primitives ===
Each command inside the script starts with a one byte DETECTORCODE that selects
{| class="wikitable"
! DETECTORCODE !! Command !! Size !! Layout (after the code byte)
|-
| 1 || Acquisition || 17 || typeMode:1, imageId:1, noScrubs:1, scrubDuration:4 LE, maxExposeTime:4 LE, tailTime:4 LE, transferMode:1
|-
| 2 || ROE command || 14 || responseFlag:1, timerValue:4 LE, roeCmd:4 LE, roeData:4 LE
|-
| 3 || Send host event || 5 || eventId:4 LE
|-
| 4 || Wait for host event || 9 || eventId:4 LE, timeout:4 LE
|-
| 5 || Delay || 5 || delayMicroseconds:4 LE
|}
Acquisition command triggers the actual exposure window and image readout.
=== Download sequence ===
# The host sends the GENERIC_SCRIPT packet for a given scriptID.# The detector replies with a bare acknowledgement carrying the same sequence ID. (It may also send a GENERIC_SCRIPT status reply with a status byte; status 0 means accepted.)# The host repeats this for each script it wants resident on the detector.# When ready, the host sends EXECUTE_SCRIPT, cmd_type 6, which runs the stored scripts. During and after execution the detector sends status notifications, and finally EXECUTION_COMPLETE, cmd_type 0x10000.
Scripts are persistent for the session: once downloaded they can be executed
without resending.
=== The standard script set ===
The single energy mode downloads four scripts in order. The scriptID in the
{| class="wikitable"
! scriptID !! Purpose !! Notes
|-
| 7 || ROE initialization || Scan setup plus a sequence of zero pulses, ends by sending host event 17
|-
| 8 || Standby loop || repeatCount 65535, broken by event 41; keeps the panel idle between acquisitions
|-
| 0 || Standard acquisition || Requires a real X-ray exposure to complete
|-
| 1 || Dark / offset acquisition || Completes with no X-ray; used to test the full flow
|}
EXECUTION_COMPLETE in a few seconds.
=== Inspecting the encoded scripts ===
See [[#Main test py script: Usage and Parameters|Main test py script]]
The exact wire bytes of every built script can be printed without touching the