-1

I have a rather generic question regarding the best option for programming in CAPL when dealing with signals.

Assuming you need to write CAPL code to set the value of a signal, which approach is best:

  1. to use setSignal system function, which directly sets the signal via the IL

  2. to bind a SysVar to the signal and write event handlers to manage the updates?

I'm no expert in CAPL programming and I've heard people advocating either for one or the other.

Those sustaining SysVars made a point on the fact that there's no return value from the setSignal function, so there's no way of checking the signal change took place successfully unless implementing some additional safety checks.

Thanks for sharing your wisdom :)

  • 2
    Hello Monica, welcome to SO. This question is primarly [opinion-based](https://meta.stackoverflow.com/questions/255468/opinion-based-questions) and I flagged it as such. In the end, depends on what you want to achieve. Binding Sysvars might let you create a stronger testing strategy, but ultimately it depends. You can have panels to modify sysvars, looks a bit ugly to have panels setting signals, but you can have them as well. – Daemon Painter Apr 25 '20 at 10:08

1 Answers1

0

you can use setSignal and later getSignal if you want to confirm/verify that it is rr

szymon
  • 16
  • 1