Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Mike Nash on September 25, 2017, 04:17:01 PM

Title: BRX Analog Question on Quirky Behavior
Post by: Mike Nash on September 25, 2017, 04:17:01 PM
BX-DM1E-36ER3

For bench testing prior to build, I connected WY1 to WX0 to simulate a potentiometer input.

While "running" I am getting glitches where the WX0 value is going negative (greater than 32767 as Unsigned value).

This shouldn't be happening with the clamps should it? With a scope I am seeing noise, but none of it appears to go negative polarity. It's about a 0.5 microsecond transient with peaks at 6.4 to 14VDC.

At 9.98VDC out, I don't see any PLC issues (noise is still there) but I do at 9.99VDC.

So even if I clean the noise up, why aren't the clamps preventing the input from being scaled to zero? It sure looks like an excessive positive value rather than an actual negative.

SO I changed the WX0 input to +/- 10VDC and the RX0 Min and Max to -100 to 100 and let the LERP clamp handle over-range and the problem goes away. Now I can see RX0 is actually bouncing to 100% during the noise events.

Noise is bad, but I didn't expect the unipolar to behave as it does. The noise is from a VFD with no motor and connected via ModbusTCP Cat5 through a switch across the room and back. The wiring from WY1 to WX0 is just 2 loose 12" wires about 3 feet from the VFD. Yes I know the wiring is not correct, but neither is the unipolar behavior I don't think.

Title: Re: BRX Analog Question on Quirky Behavior
Post by: BobO on September 25, 2017, 05:34:13 PM
BX-DM1E-36ER3

For bench testing prior to build, I connected WY1 to WX0 to simulate a potentiometer input.

While "running" I am getting glitches where the WX0 value is going negative (greater than 32767 as Unsigned value).

This shouldn't be happening with the clamps should it? With a scope I am seeing noise, but none of it appears to go negative polarity. It's about a 0.5 microsecond transient with peaks at 6.4 to 14VDC.

At 9.98VDC out, I don't see any PLC issues (noise is still there) but I do at 9.99VDC.

So even if I clean the noise up, why aren't the clamps preventing the input from being scaled to zero? It sure looks like an excessive positive value rather than an actual negative.

SO I changed the WX0 input to +/- 10VDC and the RX0 Min and Max to -100 to 100 and let the LERP clamp handle over-range and the problem goes away. Now I can see RX0 is actually bouncing to 100% during the noise events.

Noise is bad, but I didn't expect the unipolar to behave as it does. The noise is from a VFD with no motor and connected via ModbusTCP Cat5 through a switch across the room and back. The wiring from WY1 to WX0 is just 2 loose 12" wires about 3 feet from the VFD. Yes I know the wiring is not correct, but neither is the unipolar behavior I don't think.



What firmware are you running?
Title: Re: BRX Analog Question on Quirky Behavior
Post by: Mike Nash on September 25, 2017, 06:02:47 PM
What firmware are you running?

Do-more Technology Versions:
Do-more Designer: 2.1
Disk Project: 2.1
PLC Project: 2.1
PLC OS: 2.1

Software Versions:
Do-more Designer: 2.1.1.10
PLC OS: 2.1.0
PLC Booter: 1.0.2
PLC FPGA: 1.7

Windows OS:
Windows 10 Pro (Build 15063)

I am on a different computer and at home with VPN so that is what is in the BX. It shipped with V2.0 and I upgraded after we got it last week I think, or maybe the week before late.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: BobO on September 25, 2017, 09:44:43 PM
We fixed some stuff related to the clamping and scaling in the most recent release, but that doesn't mean there aren't still some math quirks hiding in there. I have the unit on my desk looped and can't see any issues, but there are slight calibration differences between the input and output that are preventing the input from getting to absolute full scale.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: Mike Nash on September 25, 2017, 10:05:21 PM
I have the unit on my desk looped and can't see any issues, but there are slight calibration differences between the input and output that are preventing the input from getting to absolute full scale.

I noticed the same, whereas the actual output measured 10.05 VDC (with a $2.99 on sale meter admittedly) the input did not quite reach 32767. The craziness didn't happen until I got the output up to 9.99 V (PLC Value, not measured) AND the input was getting induced noise. Still, I would expect the clamp to prevent any craziness. At no time did the input fall below 6VDC viewed by scope.

I did notice the input reads about 0.6VDC with nothing connected and no induced noise. Shorting it to 1C dropped the reading to zero. I suspect the input impedance is pretty high?

I expect this one will be set for bipolar and just let the LERP do the clamping since that works as expected. I do intend to wire in a pot and see if that doesn't eliminate the noise and shielded cable as well. But hopefully you'll get a nice solution in a future update.

P.S. The scope was $7K new, mumbly-mumbly years ago. I have a thing for past-expiration equipment I'm afraid.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: BobO on September 25, 2017, 10:12:00 PM
I found a typo in the analog code, which appears to allow an overflow of about 20 counts...32767 got entered as 32787.

It should only affect the 0-10VDC range...and is now fixed.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: BobO on September 25, 2017, 10:12:53 PM
I did notice the input reads about 0.6VDC with nothing connected and no induced noise. Shorting it to 1C dropped the reading to zero. I suspect the input impedance is pretty high?

Very high.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: BobO on September 25, 2017, 10:20:31 PM
Still, I would expect the clamp to prevent any craziness.

The error was affecting the calibration scaling (converting raw analog to 0 to 32767) and was allowing the out of range value to sneak in after the clamp had been applied. The WX/RX clamping/scaling was not a part of this...it was broke before it ever got there.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: Mike Nash on September 25, 2017, 10:36:28 PM
I found a typo in the analog code, which appears to allow an overflow of about 20 counts...32767 got entered as 32787.

It should only affect the 0-10VDC range...and is now fixed.

Great! I expect I shouldn't look for an update in the next week or so though? Since I know bipolar works and caught it early I'm good on this one either way.
Title: Re: BRX Analog Question on Quirky Behavior
Post by: BobO on September 25, 2017, 11:34:57 PM
Great! I expect I shouldn't look for an update in the next week or so though? Since I know bipolar works and caught it early I'm good on this one either way.

Since we just released, we'll probably wait.