Hello Guest it is March 29, 2024, 01:25:04 AM

Author Topic: My Brain Needs Help!!!  (Read 3346 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,235 2,235
  • Briceville, TN, USA
    • View Profile
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
fun times
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