Hello Guest it is November 15, 2019, 04:44:53 AM

Author Topic: My Brain Needs Help!!!  (Read 2672 times)

0 Members and 1 Guest are viewing this topic.

My Brain Needs Help!!!
« on: June 01, 2009, 02:54:22 AM »
I'm using a Pokeys analog input and while going threw a voltage divider it is very unstable..so what kind of code can one write to calm it down a little or other words buffer it.
Thanks for the help
Dave....

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: My Brain Needs Help!!!
« Reply #1 on: June 01, 2009, 11:50:28 AM »
In your case if I understand what your wanting to do, it may be easier to set up a DeadBand in the Macro pump for that input. First Map your MODBUS127 to a User DRO.

Brian = Mod127->noop->UDRO1500

Then in Macro pump: (for a 10 point dead band on a scale of 0-100, band in the middle)

AnaIN = GetUserDRO(1500)

if AnaIN < 55 and AnaIn > 45 Then
MyDeadbandValue = 50
SetUserDRO(1501, MyDeadbandValue) 'this could also be an OEM DRO if it is one that allows writing to it
else
SetUserDRO(1501, AnaIN)
end if

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: My Brain Needs Help!!!
« Reply #2 on: June 02, 2009, 04:58:43 AM »
Thanks for the reply Scot,
A little more on what I'm doing...I'm using Matts DTHC concept with a Pokeys and to say at the least it works quite well
my only problem is (after talking to Bois) is that I must be getting noise though the usb cable....just enough to be annoying...I tried just about everything to fix it...so this is were I asked about buffering the signal...Yes I am using the brains that Matt wrote, they seem to work much better than mine..(as I am new to the brain thing)...and now I guess I will figure out the macro pump thing....if its VB then I will be really lost...any good threads on this.....can it done in a brain?.
After talking to Matt this might be a good thing to know in the future!!!!! ( to be added to a plug in :)
Thanks for your help!!!!
Dave