-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to consistently read telemetry items without having to send a SCPI query command. #1673
Comments
I don't think its documented, but all interfaces have an option called PERIODIC_CMD: https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/interface.rb#L502 Add this after your INTERFACE line in plugin.txt and it will periodically send the command in quotes.
|
@ryanmelt Thanks for the help! One follow up question - is it possible to have multiple PERIODIC_CMD responses recorded in the same telemetry packet? The response packet, defined below, does not work, I believe because of the multiple TEMPLATE inputs. TELEMETRY OSCOPE TLM BIG_ENDIAN "OSCOPE Telemetry" |
@hmaclachlan You'll need to combine the SCPI commands into one big SCPI command that queries everything, and then it should work. |
@ryanmelt How do you correctly configure/parse the separate telemetry outputs when you combine multiple SCPI commands? Getting the error (Decom error: RuntimeError : Unexpected number of items found in buffer: 0, Expected: 4) and the entire packet is reading null with this configuration: VARIABLE oscope_target_name OSCOPE TARGET OSCOPE <%= oscope_target_name %> COMMAND OSCOPE GET_MEAS BIG_ENDIAN "Get Measurements" TELEMETRY OSCOPE GET_MEAS_RESPONSE BIG_ENDIAN "OSCOPE Telemetry" |
The TELEMETRY TEMPLATE has to be just right. Take a look at the raw data if you can and look for spaces etc. Those will have to be in the template. Also I know we made a fix for this in 5.19.0. If you're not on the version, you'll need it or 5.20.0 which we'll be releasing tomorrow. |
Hello,
I have a device that is my target which operates via SCPI commands. I want to obtain consistent telemetry readings from this target. From my current plugin, cmd, and tlm.txt files, I am only able to receive the output from a query command as telemetry when the command is sent. Is there a way to configure the plugin.txt differently to allow the telemetry to be acquired consistently without having to send a command each time?
VARIABLE oscope_target_name OSCOPE
TARGET OSCOPE <%= oscope_target_name %>
INTERFACE <%= oscope_target_name %>_INT tcpip_client_interface.rb xxx.xxx.xxx.xxx xxxx xxxx 10.0 None TERMINATED 0x0A 0x0A
MAP_TARGET <%= oscope_target_name %>
PROTOCOL READ_WRITE CmdResponseProtocol
COMMAND OSCOPE GET_MEAS1 BIG_ENDIAN "Get Measurement 1"
ACCESSOR TemplateAccessor
TEMPLATE "MEASU:MEAS1:VAL?"
RESPONSE OSCOPE GET_MEAS1_RESPONSE
TELEMETRY OSCOPE GET_MEAS1_RESPONSE BIG_ENDIAN "OSCOPE MEAS1 Telemetry"
ACCESSOR TemplateAccessor
TEMPLATE "<GET_MEAS1>"
APPEND_ITEM GET_MEAS1 32 FLOAT "Measurement Value 1"
FORMAT_STRING "%0.3f"
The text was updated successfully, but these errors were encountered: