r/crestron • u/ryanworkaccount • 16d ago
More Efficient Way To Send Serial Command
I came from a Data Scientist Role in the medical space to AV programming (and have only a few months of Crestron under my belt) so bear with me...
I have three identical displays, I need individual control and master power.
I realize I could just link up three Serial IOs to the touchpanel symbol and call it a day... I can't help thinking this isn't best practice though.
In my old world (Python/PHP), I would create a helper function with a generic command to pass to three different devices. IF deviceid=1, THEN I would run the function then send the output to var device1.
It seems like I should be able to do something in SIMPL, possibly with buffers.
- On the touchpanel PRESS display1.on
- BUFFER display1.on to display.on
- Display.on grabs the line item from the SERIALIO
- Some variable that indicates I was using display1 drives the signal high on a SERIAL BUFFER to only broadcast the hex to the first display...
I know I am not the first person to do this. Am I way out in left field? This seems overly complex for something that should be relatively straightforward... Perhaps I'm just better off with the individual SERIALIOs?
6
u/midsprat123 16d ago
Allow me to introduce crosspoints.
Allows you to link single buttons to multiple displays and have feedback depending on which display you are talking to.
7
u/CivilClassroom7948 16d ago
Just turn the fucker on.
Im the service guy who always has to go back and figure out why your logic crap stopped working.
If it push on simply send display on. Easy peasy.
Dont make it complicated Karl.
1
u/sausix 16d ago
If you write "IF deviceid = 1" in PHP or Python then it's already inefficient. You should use lists/arrays.
You have routers in Crestron and you can even put IF statements into a Simpl+ block.
I understand your wish to only have one driver definition as SIO. Main issue is signal wave timings. You could set a route to one or many devices by a push event and trigger your SIO by the release event. Kinda easy.
Crestron get's complicated beyond easy stuff. Could be easier to write your program within Simpl+ mostly. But then you have forward definition issues. You can't call functions which are defined later in the code. Been there. And I've seen strange workarounds of other programmers looping a signal out and back in into the symbol.
Crestron is complicated on efficient programming.
3
u/AstronautOk1630 16d ago
The most efficient way for the processor running a SIMPL program is likely 3 separate SIO’s and link the buttons or logic directly to them. Don’t over complicate SIMPL. C# or Python have at it.
1
u/Pale-Struggle6595 16d ago
you could write python in 3 and 4 series processor iirc and make it simple with your code
if you're using simpl windows and have identical display (LG for example) then you can use the serial command provided for that brand. make sure to connect com port processor to rs232 display (if it has any).
for me it's TP.DISPLAY1ON->SIO.ka0101\xd->COM1.DISPLAY1.TX
1
u/jbp216 16d ago
just do it in simpl# pro if you can program, otherwise crosspoints are what youre looking for
the reality is youre using a multicore processor running at an insane speed to send commands, if youre hitting the edge of a crestron processor youre using the wrong product
1
u/Separate_Mango4458 14d ago
If you can already program in Python/PHP, why the hell are you using SIMPL/SIMPL+? Just learn/use C#. 4 series controller can run Python, but Crestron's frankenfirmware is a joke. aarch64 kernel, but an armhf user space, and Python 3.8 (way out of date) with armel ABI. Makes using Python packages tricky. We get around it by installing a custom Python-3.14_aarch64 build on the controller and use that.