Main Site Documentation

Raptor, Digital Inputs and Load Module .NETMF 4.3


#1

Hello,
I am using the load module to run a winch until I hit an end stop at which point I need to switch channels on the load module and run the winch the other way until I hit another end stop and switch direction again.

The end stop switches are going to be digital inputs. The problem is that I cannot figure out how to monitor the digital inputs at the same time I have a channel open on the load module.

I know there is a create digital interrupt port. However, I cannot use port 3 on the sockets because those will be needed for analog inputs. So I need to figure out how to do this using regular digital inputs.

I have a hunch that it has something to do with threading and avoiding the use of the while loop. Any help would be appreciated as I am starting to run out of time in getting this implemented into our control system.

Thanks,
Jordan


#2

Hi Jordan,

If you’re using Gadgeteer, you could base your code on the ButtonS7 module source code which replicates this behaviour.

https://bitbucket.org/ghi_elect/gadgeteer/src/f4166debf799d741ac2ced860d2d2af82cf5698c/Modules/GHIElectronicsDiscontinued/ButtonS7/ButtonS7_43/?at=master

Just be warned, you might need some de-bounce filtering either in software or hardware or both depending on the way your signals run.