Link to home
Start Free TrialLog in
Avatar of willbdman
willbdmanFlag for Australia

asked on

Development of software to control external interface

I am looking to develop a software progrqam to control a variety of valves on a machine.

What is the best way of going about this?

What hardware is required for:-

a) using the serial port to control the device

b)using the paraleel port to control the device

c) using the USB port to control the device

d) Which one is better to use?

Would I need to develop a Kernel-based driver in order to interact with the device?

I am a proficient VB.NET programmer - is there anyway of using this IDE?

Quick answers greatly appreciated.
Avatar of moorhouselondon
moorhouselondon
Flag of United Kingdom of Great Britain and Northern Ireland image

It depends on what interfaces are available on the valves.  If for example they are driven by RS232 then a serial port is the best method of connection.  

Serial port is the slowest
Parallel port is faster, but needs more careful design (the lines need to be "sampled" when in a stable state).
USB is probably more difficult, unless there is a USB interface on the valve already.

The distance between the machinery and the pc is a factor too.  RS232 can work over longer distances.  With parallel over long distances you have to be careful.

Avatar of willbdman

ASKER

The valves currently just have to be triggered by an electronic pulse, obviously I will need to control this via software.

The valves currently have no connection to it, this is what i will need to construct or find some way of attaching to the PC, any ideas?

thanks,

Will
What is the specification of the pulse?  What socket is on the valve to enable it to be input?  Or alternatively if you say what valves you mean, we can look it up (manufacturer, model no).
The input to the valve is just a standard wire, which requires electricity to force the valve shut.

Pulse just needs to be a small voltage.

This forces the valve to close.

When there is no voltage the valve is open.

Therefore, the software needs to be able to trigger this voltage input and then start a timer for other valve voltages. The timer values need to be fully adjustable.

For example. Valve A is triggered, Valve B is set to be triggered 2 seconds after valve A, Valve C is set to be triggered 0.5 seconds after valve B.

Is this possible?

Will
I would use RS232 (serial) for this application.  You will need to build an electronic circuit which either

(a) takes in one pulse which acts as the start of a chain of events - you will then use electronic timers to regulate your valves

or

(b) you feed the data pulses into a shift register and then use logic gates on the electronic board to determine which valves to fire.  The pc does the timing and outputs a bit pattern that corresponds with the action required.  

(a) is simpler to design, but any changes will involve fiddling around with a soldering iron.  (b) is more complex to design, and is more likely to suffer from timing problems.  (a) simply involves one pulse and the hardware does the rest (b) involves the pc continually sending out bit patterns to manage the sequence of events.
ok, sounbds good.

How would i program for a pulse to go through the serial port?

Is there any books you would recommend that could help?
You would copy something to the serial port at the command prompt:-

copy con com1

(where con is the console and com1 is your serial port).  You then type in something and then terminate the stream by pressing Control Z.  How this stream is interpreted depends on the hardware attached to the serial port.  If using technique (a) you could type one character in and this could be use to set off the sequence.
ASKER CERTIFIED SOLUTION
Avatar of moorhouselondon
moorhouselondon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial