Invert State of Output Pins

Discussion of the physical aspects
Post Reply
User avatar
AndrewsBrewing
Posts: 35
Joined: Sat Feb 14, 2015 10:06 am
Bot?: No
Contact:

Invert State of Output Pins

Post by AndrewsBrewing »

Is there a way to do the above? Meaning when you callout an Output Pin in the program, it is low instead of high?

My Adafruit sound board wants to see a trigger of low. I realize I can invert with a transistor or hex inverter, I just wondered if there was a way to do it native to the BCS. Just fyi, we are playing sound files at specified times during the brew day. Such as "Five minutes until the next hop addition".

Eric
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Invert State of Output Pins

Post by JonW »

The BCS does not have any way to directly configure the outputs for inverted logic.

You could probably do this indirectly though with Registers and Ladder Logic. Your LL would normally keep the output asserted when the register is not set, and turn the output off when the register is set. Your state could then control the sound board by setting the registers in the necessary state.
User avatar
AndrewsBrewing
Posts: 35
Joined: Sat Feb 14, 2015 10:06 am
Bot?: No
Contact:

Re: Invert State of Output Pins

Post by AndrewsBrewing »

Thank you, Jon. Very helpful. Here's a different question.

Is it possible to define a register that sets an output pin to high for a second or so? Then when I call out that register in a state, the sound board would not be playing the sound file over and over again.

I am a newbie to LL.

Sincerely,
Eric
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Invert State of Output Pins

Post by JonW »

No, that is not really possible. The only way to do it is to activate a state that sets a register, then after the time specified, go to another state to clear the register. Probably not the best way to approach it.
User avatar
AndrewsBrewing
Posts: 35
Joined: Sat Feb 14, 2015 10:06 am
Bot?: No
Contact:

Re: Invert State of Output Pins

Post by AndrewsBrewing »

Jon, just FYI, I solved this issue with a transistor and a resistor

Eric
Post Reply