PLUS+1 User Forum

PLUS+1 Tools => PLUS+1 GUIDE => Topic started by: Daan on March 20, 2023, 01:32:56 PM

Title: Switching and connecting 2 analog signals
Post by: Daan on March 20, 2023, 01:32:56 PM
Hello everyone!

I have a problem and I hope you can help me with it.

I have an analog signal that can vary from 0-12V as well as 0-24V. How can I ensure that depending on whether the supply voltage is 12 or 24V, the correct analog signal is scaled?

Is it possible to connect these 2 analog signals to 1 analog output without this giving an error?

Thanks in advance for all the help!
Title: Re: Switching and connecting 2 analog signals
Post by: G30RG3 on March 20, 2023, 05:33:32 PM
Compare the source voltage to a fixed value, the output from that compare can be used to (binary) switch the right result from your scaling operation.
Or if needed compare the source voltage to a few fixed values to switch between the scaled outputs and in a "in between source voltage" give a fixed voltage that is "out of range" to provoke an error
Title: Re: Switching and connecting 2 analog signals
Post by: FluidPowerTom on March 20, 2023, 10:52:13 PM
As G3 was mentioning you could use a comparison on the source voltage.  For most controllers that'll be C1P2.voltage, and you could just check to see if it's greater than 20V to determine which voltage source you've got.

No, you can't connect the signals as you've done in that image.  You will want to use either a Boolean Switch or a couple of Value Connect components along with that comparison that I mentioned.
Title: Re: Switching and connecting 2 analog signals
Post by: Daan on March 21, 2023, 10:06:37 AM
Thank you for the information G30RG3 and FLuidPowerTom!

I understand the comparison with the supply voltage, but I don't understand how and with what it is connected to the scaling? You talk about a certain switch but I don't really know what component you mean by this. I have only recently started programming in PLUS+1 GUIDE, so I have not mastered the program very well. Would it be possible to show an example of the components or tell me where to find them?

Thanks in advance for all your time and help!
Title: Re: Switching and connecting 2 analog signals
Post by: Lukey on March 21, 2023, 03:00:21 PM
Daan as FluidPowerTom said, try Switched 2 component.
Connect you ABS output value/s to each of the switch legs on the left of the Switch 2 component, the output leg of the Switch 2 then goes to the Currentout.
The switch leg on top of the Switch 2component connects to the >20 comparison component output.
You wont need the <20 comparison.
Title: Re: Switching and connecting 2 analog signals
Post by: Daan on March 21, 2023, 03:33:47 PM
Hello Lukey

My apologies to all of you, I over looked this. But thanks for all the help! The program now works without any problems!  ;D