Digital Input device to c# - c#

The Problem:
I'm writing an application that needs to receive electrical input from a machine every time the machine does something.
I have a Limit switch set up to the machine and it currently completes a circuit every time the machine does it's thing
I need it to input into a computer using usb as oppose to just complete a circuit.
I had a dataq 'dl-148u-sp' And i got the c# code to produce a graph using ActiveX controls but all i really need is the digital output from the circuit being completed (which for the life of me i couldn't figure out how to do)..
I ended up frying the device(i think) even the software it came with doesn't recognize it anymore...
I need a new device, and it turns out they discontinued the one i had, and the next one up after shipping is like 90$.
The Question:
Is there a Better/Cheaper/Easier way of doing this? Or can anyone suggest a Good device that's easy to get the output using c# code so i can incorporate it into a program i made?

It's not clear if you are asking for a hardware or software solution here. Are you asking what the best way to facilitate that data transfer from your machine to the PC? If so, this may not be the place to ask, but you might look at a USB to GPIO module.
http://numato.com/8-channel-usb-gpio-module is an example.

I'd recommend an Arduino:
http://www.arduino.cc/playground/Main/InterfacingWithHardware
They dev kits are cheap and there's a ton of open/free libraries that interface the Arduino to C#.

More expensive and complex board is IOFirebug with c# library and many functions. Input voltage range is from 5V to 30V.

Related

Windows: create a multi-mouse lib that dose not require an UI

I'm trying to create a windows application that can manage multiple mouses, with the feature of understanding which device is generating the input
(something like Microsoft's Multimouse, but without a UI).
The problem is that I don't want to use a UI because this will be a plug-in for Unity3D so I have many limitations imposed from this.
I also thought about a parallel service that can talk with Unity, but in that case I would like to not block all the system to take mouses inputs.
In this special case I have to manage 12 of these devices: AimTrak, that are recognized as a mouse input device.
So does anyone have some idea about that how can do this without hacking them and rewriting their driver?
Ok after 3 days of googleing things i have found a way to do this!!!!
We have need to make a windows's system hook on user32.dll in order to catch all mouse inputs.

Printer Communication Capture

If I need to post this elsewhere let me know.
We have some old software thats being re-written, that uses a printerdriver to a propriatery printer.
I need to rewrite the software bypassing the print driver and go directly to the printer. I do have the specs for the printer communication, thats fine, but what Id like to do is monitor the communications to the printer to view its contents (from the existing software that Im re-writing) and compare it to the specs, and what I will be sending it for validation.
I have to make sure Im not missing anything.
Any ideas on how I might be able to accomplish this?
Thanks
To capture the traffic you have to basic options.
1. Use software
If you are using ethernet, you can use a program like WireShark or USBTrace to capture the packets that are being sent out. There are similar programs for USB.
2. Use hardware
Another option would be to use an external logic analyzer. It's basically a box that sits in-between the computer and the printer that captures all the data, then uses software to decode it. There are some inexpensive options available (USBEE, Bus Pirate, and Total Phase Beagle.
I own a USBEE and I've used it to debug a simple USB device. It works well enough for that. The software is a little clunky though.

Zabbix and time series data

We should monitor and log ~1000 devices (1..4 sensor per device). SMS and email alert and the common functions are required if anything going wrong.
I think we instead of developing the whole ecosystem in .NET/C# it would be nice to use an existing one - for example Zabbix. But is it possible without any bigger hack?
I think that the main problem is that the devices are old-school and using RS232 for communication.
Any idea or any other flexible monitoring software?
Zabbix is a good monitoring tool, and it's easy to configure sms and email alerts. You'll need to script the serial port check, as there is no built in support for that. This may help: http://ramblings.narrabilis.com/node/310

Capture Raw Signal from WiFi card as You Would a Sound Card

Is it possible to capture the raw signal from a WiFi card in the same way you can capture the signal from a sound card? (I already found code for working with a sound card and for drawing spectrograms) I'm wondering because it would make a cool radio-type project. I'd prefer a solution that integerates well with .net (VB or C#).
My basic goal is to capture the ambient radio waves and build a primative "telescope" of sorts. Using the built in computer hardware is just the easiest way to accomplish this. If you have any other suggestions about how to accomplish this goal in a different way please post it as an answer also.
Thanks.
Look up "Software Defined Radio". They are usually either radio electronic kits or fairly expensive hardware. You will still need an antenna.

How to detect incoming network transfers in windows (preferably in c#)

I was wondering if anyone knows how (or even if it is possible) to monitor and trigger an action when a computer running windows (7-8) starts reciving a file transfer from over the network onto one of its drives.
Bonus points if I can find out how big the file is that the other guy is placing on my machine and how much is done etc...
I want to know if there is any API in windows, or snippit of code, or some other API that provides any of this functionality.
I still want to be able to recive files, I just want to manage them better. I am on a network with over 90 computers and this software that I wish to write would be running on most of them.
Of course you can (after all it's what an Antivirus program does) but it's NOT easy and probably you'll see it's more comfortable to do in C than in C#. I'm sure there's a .NET porting of WinPCap anyway you can always P/Invoke.
Start reading about Network Monitor SDK on MSDN. It's not an easy task, you have to capture a specific set of frames, you may use a Network Packet Monitor to inspect the content and the type of the packets you have to capture and parse.
I'm not sure but you may take a look to QoS API (start reading this article), it should provide something you can use.

Categories

Resources