01-19-2023 01:41 PM
the host file contains the ability to save a video snippet via a switches on off state. this code works great by itself but once network streaming is introduced it stops working. im able to verify that the boolean signal does pass to the host computer but im struggling to make the value do the same thing as the switch in the video saving loop. i tried using it as a local variable and a property node but it seems that that it wont even create the initial file. all it needs to do is change the state of the switch inside the video saving loop and i'm able to do it but it does something completely different compared to just manually flipping the switch
01-19-2023 02:00 PM
okay so i figured out the network stream was constantly sending false and the loop was taking it as a new value and sending it tp the case structures value change as false. is there a way to only send a signal to the switch only when there's a value change?
01-20-2023 08:24 AM
@amthonys777 wrote:
okay so i figured out the network stream was constantly sending false and the loop was taking it as a new value and sending it tp the case structures value change as false. is there a way to only send a signal to the switch only when there's a value change?
Sure. There's a "Value-changed" function that you can find on the Signal Processing, Point-by-Point Palette, which is basically a "Do-once" While Loop that takes the Data Point inside the While Loop, passes it to a Shift Register on the output side and compares it with the value of the same shift register on the input side, asking "Are they the same?". It has a few other "niceties" like initializing properly (the first value is never "different").
Bob Schor