how can i serialize in schematyc

#1
sequentializer_Node.png
sequentializer_Node.png (3.89 KiB) Viewed 779 times
looking to this in schematyc

so every time it inputs>1 time it outputs in order on at a time.

if state switching worked i would use different states to do it, how ever if i try and use a botton press to switch states continuously between two states it only switches state once and never lets me switch more than 1 cycle

Re: how can i serialize in schematyc

#3
didn't really under stand that but found another way to get the same result if you trying sequentialize button press back and forth

flashlight graph.png
flashlight graph.png (117.2 KiB) Viewed 651 times



You could do it this way:

Image

Set up a Int32 variable (I called mine "Counter1") Value=0
In the Math Add function set B to 1 so it will increment it each time.
Based on the number of cases you can just set Counter1 back at the end of your last function.

Re: how can i serialize in schematyc

#4
In this example we have:
2 Projector Lights
variable (Int32) Var_Counter1 = 0

The theory behind the following setup:
We make a variable that we increment after every button press
We check the value on that variable and based on that trigger the output that the value corresponds to.

Image

Description 1:
We press key
Var_Counter1 = 0 and we increment it so its 1.

Description 2:
We check Var_Counter1 and trigger the output that Var_Counter1 has.

Description 3:
Since Var_Counter1 is now 1, we enable the ProjectorLight1.
We press the key again.
Var_Counter1 = 2, we disable ProjectorLight1.
We press the key again.
Var_Counter1 = 3, we enable ProjectorLight2.
We press the key again.
Var_Counter1 = 4, we disable ProjectorLight2 and we set Var_Counter1 back to 0

Description 4:
This sets Var_Counter1 back to 0
We press the key again.
We are back at Description 1.

Hope I have made it a bit more understandable :)
Last edited by Cry-Chris on Wed Sep 19, 2018 1:00 pm, edited 1 time in total.

Re: how can i serialize in schematyc

#5
Ok I now understand what is being shown I didn't catch on that counter1 was a variable.


In this example we have:
2 Projector Lights
variable (Int32) Var_Counter1 = 0

The theory behind the following setup:
We make a variable that we increment after every button press
We check the value on that variable and based on that trigger the output that the value corresponds to.

Image

Description 1:
We press key
Var_Counter1 = 0 and we increment it so its 1.

Description 2:
We check Var_Counter1 and trigger the output that Var_Counter1 has.

Description3:
Since Var_Counter1 is now 1, we enable the ProjectorLight1.
We press the key again.
Var_Counter1 = 2, we disable ProjectorLight1.
We press the key again.
Var_Counter1 = 3, we enable ProjectorLight2.
We press the key again.
Var_Counter1 = 4, we disable ProjectorLight2 and we set Var_Counter1 back to 0
We press the key again.
Var_Counter1 = 1.

Hope I have made it a bit more understandable :)

Who is online

Users browsing this forum: No registered users and 1 guest