Closed CSG2019 closed 9 months ago
I suspect I need to use the groups method to differentiate, but I still don't know exactly how to implement it.
Is not possible to use mdf.get("L1.Supply.voltage")
?
I tried below code: import asammdf
file_path = "D:\test.mdf"
mdf = asammdf.MDF(file_path) L1_signal_voltage = mdf.get("L1.Supply.voltage")
It will report :
raise MdfException(f'Channel "{name}" not found') asammdf.blocks.utils.MdfException: Channel "L1.Supply.voltage" not found
Then you should play around with this method https://asammdf.readthedocs.io/en/latest/api.html#asammdf.mdf.MDF.whereis L1
and L2
should be found for one of its arguments
Then you should play around with this method https://asammdf.readthedocs.io/en/latest/api.html#asammdf.mdf.MDF.whereis
L1
andL2
should be found for one of its arguments
Thank you for your help.
I tried to use whereis method to get the signals position as below, and get the result is : ((5, 1), (6, 1)), but it seems that I still can't confirm which one is L1. The other question is , once I got this tuple, how to plot/read this "L1.Supply.voltage" signal
mdf = asammdf.MDF(file_path) signal_position = mdf.whereis('Supply.voltage') print(signal_position)
Try sig = mdf.get(group=5, index=1)
, that returns a Signal object. Get samples with sig.samples and plot with sig.plot()
Try
sig = mdf.get(group=5, index=1)
, that returns a Signal object. Get samples with sig.samples and plot with sig.plot()
thank you. it can work.
Hello,
I've just started using this library. now I have a test data, this data contains 2 different channels ,but the 2 signal names are same, how to get the value separately. thank you. below is the screenshot from CANape