'Control a Relay Card controlled with Python via a track-bar-switch in CANoe

I am currently working on a project where i want to control a Relay Card (Conrad 197720) via a Switch that is accessable through a dedicated Panel in CANoe.

It should look like this at the End:

Panel Designer Track Bar

I can already access the relay card via Python in the console. For example if i want to use Relay 1 of 8, this is the command i use in the terminal: PS C:\Users\xxx\Downloads\Conrad_197730-main> python CONRAD_197720.py -p COM7 -c 3 -b 00000001 -k 1

My Plan is to use the sysExec functionality in CAPL that launches the python function in the terminal.

The main problem is, that i am a complete beginner in CANoe and don't really now if my idea is implementable in CANoe like this.

In my next step I think I should be clear whether each switch position corresponds to a variable or a signal. This would then have to be processed "somehow" by a CAPL function. How should I start this next step?

Thank you a lot! I would be very happy if there is somebody who could help me :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source