It would require turning them on one at a time.... wait you're right. Shit.How would that detect a short between two wires?
It would require turning them on one at a time.... wait you're right. Shit.How would that detect a short between two wires?
I must add though that shorts will be extremely unlikely in this case... we aren't testing field wiring that may have gotten beaten up, we're testing that the temps put the pins in the right holes. Testing for shorts would still be good though.It would require turning them on one at a time.... wait you're right. Shit.
Holy crap I never thought about using a multiplexer like that. Mind blown.Yes I'm extremely interested in doing that. May be overkill for what I need, but I like overkill.
Pulse the wires one pair at a time? I.e. no cap just cycling the input? sorry if this sounds stupid.It would require turning them on one at a time.... wait you're right. Shit.
As it sequences each wire in turn and powers the wire with LED and grounding resistor connected to each wire any out of sequence LEDs would indicate a cross, any constant ON (or multiple lit) LEDs would be a short and any constant OFF LEDs would be an open. Otherwise, you would get "walking" LEDs in sequence end to end to indicate GOOD. It would sit there and cycle over and over until turned off. As long as the LEDs are lighting up in sequence the cable is GOOD!How would you use that to test for opens, shorts, or miswires?
So the PLC can be programmed to do that automatically?This tests for breaks, shorts, and crossed terminations.
Yup, the way I've done it before is to write a program with many steps (one for each connection). You turn on one output and read all inputs (usually together as an integer) and compare them to an expected result. If the result matches, then you turn off all outputs and move to the next step. If the inputs ever fail to meet the expected result, you exit the routine and jump to a fault condition which turns on the red lamp and saves the step that failed.So the PLC can be programmed to do that automatically?
If so, that sounds like a winner.
Step = 0
FailedStep = 0
If StartButton == 1 then
Step = 10
end if
If Step == 10 then
SetOutput(0, ON)
if Test1ExpectedResult == ReadInputs() then
SetOutputsOff()
Step = 20
else
SetOutputsOff()
FailedStep = 10
Step = 999 //This is the failure routine
end if
end if
If Step == 20 ........ //Repeat the test from step 10 as needed for each connection
If Step == 240 then //Last test
SetOutput(23, ON)
if Test24ExpectedResult == ReadInputs() then
SetOutputsOff()
Step = 777 //This is the success routine
else
SetOutputsOff()
FailedStep = 10
Step = 999 //This is the failure routine
end if
end if
if Step == 777
SetOutput(GreenLight, ON)
If StartButton == 1 Then
SetOutput(GreenLight, OFF)
Step = 10
end if
end if
if Step == 999
SetOutput(RedLight, ON)
If StartButton == 1 Then
SetOutput(RedLight, OFF)
FailedStep = 0
Step = 10
end if
end if
I think both are easy to learn. I find that people who are not familiar with programming in general pick up on ladder logic more quickly than text languages. It was meant to be read by electricians and you can view exactly what your code is doing while it runs.The PLC would be better in terms of durability for sure, but I have to question it being faster to learn. There are millions of Arduino tutorials and examples out there. C is relatively easy to learn... even easier in the microcontroller world. Take the above pseudo code, combine things into loops, add a couple details, and change some punctuation and it's already done.
Good point. Personally have never worked with ladder logic, but looked at enough laying around at a previous job to kind of get the general idea. My concern was more in the variations between different PLC manufacturers, setup, and such details. Probably the same as say switching from Arduino to PIC or something else. Of course there are people familiar with just about anything on here and no matter what choice is made help is only a forum post away.I find that people who are not familiar with programming in general pick up on ladder logic more quickly than text languages.
by Aaron Carman
by Aaron Carman
by Jake Hertz
by Duane Benson