Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Unable to send CAN signal through vector canoe application using py_canoe

$
0
0

Here, we are trying to send a CAN signal through vector canoe application using py_canoe library, but we are unable to send the CAN signal through the bus but at the same time we are able to read the CAN signal from the bus.

Note: In CANoe configuration the panels are designed by environment variables

Scenario 1: When we are sending the input signal as environment variable and trying to read the output from CAN signal through py_canoe library it's working.

Scenario 2: When we are sending the input signal as CAN signal and trying to read the output from CAN signal through py_canoe library it's not working.

This is the code:

import osfrom py_canoe import CANoeimport timecanoe_inst = CANoe()try:    canoe_inst.open(canoe_cfg="demo.cfg")    # Start CANoe measurement    canoe_inst.start_measurement()    time.sleep(5)    canoe_inst.set_signal_value('CAN', channel_x, "message_xxx", "signal_yyy", value)    time.sleep(5)    sig_value = canoe_inst.get_signal_value('CAN', channel_x, "message_xxx", "signal_yyy")    print(f"\Signal Value: {sig_value}")except Exception as e:    pass

Thanks for helping :-)


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>