In USB 6341 the output current is for single DO is 24 mA but i need 150 mA to turn on a SMC Solenoid valve. What should I do to convert the current ? And do I need to concern for TTL logic ?
A simple FET circuit should work for you. Maybe somebody a lot better than me at analog circuits can lend a hand.
A simple transistor circuit using an 2N2906 and two resistors will do the trick.
There are also driver circuits available which can be driven by a TTL output and will sink more than 100mA (ULN2003, for example, and many others).
With this kind of circuitry (transistor or darlington driver), the load (relay) is connected between the power supply line and the outpot of the transistor circuit (collector) or driver circuit.
Do not forget to connect a flyback diode in inverted direction from the driver output to the power supply line. Inductive loads such as relay coils may produce rather high flyback voltage when switching them off. The diode will limiit this voltage to (approx.) the supply voltage.
When using one of the ULNxxxx drivers (most of them will handle sufficient current and they all can be driven with a TTL output), you do not need an extra flyback diode. These devices have integrated diodes which have a common terminal. Tie this pin to the supply voltage of the relay and you are done.
If you want to use a transistor, connect the base pin via a 10 kOhm resistor to the TTL output, the emitter to GND and the collector to one terminal of the relay coil. The other one goes to the supply voltage. The flyback diode goes in parallel with the relay coil, with the catode tied to the supply voltage.