Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Converting coding to (I/O card) signal

Converting coding to (I/O card) signal

Converting coding to (I/O card) signal

I am developing a control application which thru a series of calculation the output is a number (int) this number will communicate with a industrial robot (ABB). The number will be a voltage number which will tell the robot to change the power higher or lower. The programming end is done. However my question is I have an I/O card what is the process of converting this integer value ( i written this application is c#) into a voltage signal I have no idea where to start looking for info on this. ANY hint of point me to a right direction would be greate thanks!

RE: Converting coding to (I/O card) signal

assuming the I/O card is hardware, you would need a driver to communicate with the card. this would be provided by the manufacturer of the card. Then you need to figure out how to communicate with the driver. That would most likely get into Win32 programming and unmanaged code.

The manufacturer may also provide a .Net API library that you could use to communicate with the device. If that's the case life gets much easier. reference the dll in your project and pass the vales to the API.

Jason Meckley

FAQ855-7190: Database Connection Management
FAQ732-7259: Keeping the UI responsive

RE: Converting coding to (I/O card) signal

I received the I/O card and i read the manual on there it contains API library in c/c++ code and examples. If i wanted to communicate from my c# form to the I/O card do i modified one of  these c++ example code (create a dll) and reference it in my c# code. I read i also need a (Pinvoke) method to communicate with c# to c++ ? Can you explain a little bit what i need to do exactly any info would be appreciated thanks.

RE: Converting coding to (I/O card) signal

the good news: you can interface with the card with .Net. the bad news: it's not simple. C/C++ is a different language. You can have your .Net code calling the C++ code, but now you are entering the arena of managed (.net) vs unmanaged (c++) objects, MarshallByRef and external DLL calls. What you want is possible, but not easy.

Before continuing with this specific task, I would spend some time learning how to call/release unmanaged objects and understand the common pitfalls and how to avoid them.

PInvoke is a low level command to invoke the process (method) you want to call.

Jason Meckley

FAQ855-7190: Database Connection Management
FAQ732-7259: Keeping the UI responsive

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close