How would I set up a trigger to change a logic state?

 

I'm wondering if anyone ahs come across this. Essentially I need to set up a trigger to change the state of a logic element. A bit like a flop flop switch.


How would you go about this? 

   Cookseyyyyy

 
Profile Image
buffos
  -  

I am also a beginner in Aximmetry, so the answer might be completely wrong.


Here is how I did it.


 


FLAG: a copy logical module, with UseDefault: On and Default: On or Off as you like. You can also use the In pin. No problem.

Set Logical Pin has  Module: FLAG, Pin: In

The other stuff is self-explanatory.

When you press any of the A, B triggers, you change the state


I guess you can save that as a flip flop compound and expose the trigger , In, and the out value of the logical compound

 
Profile Image
mrlargefoot
  -  

Interesting, I can't get it to work with that set up, it seems to just pass the trigger, it won't 'stay' on.

This is what I've ended up with that seems to work, although you have to use 2 seperate triggers to switch on and off. Luckily this actually works for my use case.


The top If is set to 1 and 0, the bottom If is set to 0 and 1.

 
Profile Image
buffos
  -  

For me, the problem with the "if modules" is that they do not branch flow. They are functions that ALWAYS output. So they cannot be used for controlling the flow

I do not know if there is an execution flow if. Theoretically, you can accomplish even with those if's the goal, but it is much more complicated

I made it a compound and here is the link 

https://drive.google.com/file/d/1c03TkTuDReMZcvf0o6-vyVXwEoMuKy1a/view?usp=sharing


What is that Hold module?


P.S The FLAG module keeps holds the value not the "set logical pin"

 
Profile Image
mrlargefoot
  -  

I'm still not sure exactly how yours works, sorry!

The Hold module in mine stores either a 1 or 0 value as defined when you press either of the triggers, if you press the top trigger it stores a 1 and if you press the lower trigger it stores a 0, then you can sue those integers as logic states.

I'm trying to build a sort of render queue for a project I'm working on. I am struggling a bit without proper branching though, I've been able to get some of the functionality but I'm running into quite a few issues.



 
Profile Image
buffos
  -  

You have a FLAG (copy logical module).

It has an initial value. Zero or One

When you send a trigger (from trigger any), you send a 1 pulse. Every other time its zero

XOR truth table is

The set logical pin acts like a tunnel. It just sets the value of the FLAG when it gets a trigger (in set) with a value

So you trigger, XOR flips the value, set logical get the trigger and the new value from XOR and sets it (remotely) to the FLAG.
You just do not see the connection from set logical pin to FLAG

The first value is the trigger the second is the logical flag (it does not matter, just for explaining)

1  1 => 0
1  0  => 1

0 0 => 0
0 1 => 1

This means of the trigger is 0 => we pass through the same value unchanged
If the trigger is 1 it flops the value.

 
Profile Image
mrlargefoot
  -  

Riiight. I was missing what the set logical pin was doing. My bad. that makes sense now, thanks for explaining!



 
Profile Image
Zoltan@Aximmetry
  -  

Hi all,

Actually there is a simple module for this functionality called Toggle.

Also there is Bitoggle which have separate triggers for switching on and off.