Jump to content
OMRON Forums

Recommended Posts

Posted

I'd like to get my existing C++ application that has been communicating with a TURBO PCI to alternatively communicate with a PPMAC.

 

Does anyone have a C++ library to link in to allow Programmatic communication to a PPMAC.

  • 3 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Posted
My company has been trying to solve the same problem but we were basically told to rewrite our HMI in C# instead. If you ever find a way to talk to the power pmac with C++ would you let me know?
Posted

My company has been trying to solve the same problem but we were basically told to rewrite our HMI in C# instead. If you ever find a way to talk to the power pmac with C++ would you let me know?

 

Hi, All.

 

I was struggling with the same problem.

 

At first, I imported C# library in VS2010 C++ compiler.

But there was some problems with memory leakage.

And it cannot be used with older version of VS compiler lik VC++6.0.

 

So, I decided to make library on my own.

It is written in C++. and you can compile with all versions of C++ compiler from VC++6.0 to VS2010.

 

But, it's the begining step, and I will add more functions.

 

Up to now, there are simple functions talking to PPMAC.

Here's the list of API functions.

 

UINT WINAPI DTKPowerPmacOpen(DWORD dwIPAddress, INT nPortNo, UINT uMode);

UINT WINAPI DTKPowerPmacClose(UINT uDeviceID);

UINT WINAPI DTKConnect(UINT uDeviceID);

UINT WINAPI DTKDisconnect(UINT uDeviceID);

UINT WINAPI DTKIsConnected(UINT uDeviceID, PBOOL pConnected);

UINT WINAPI DTKGetResponseA(UINT uDeviceID, LPSTR lpCommand, LPSTR lpResponse, INT nLength);

UINT WINAPI DTKGetResponseW(UINT uDeviceID, LPWSTR lpwCommand, LPWSTR lpwResponse, INT nLength);

UINT WINAPI DTKSendCommandA(UINT uDeviceID, LPSTR lpCommand);

UINT WINAPI DTKSendCommandW(UINT uDeviceID, LPWSTR lpwCommand);

UINT WINAPI DTKSetReceiveA(UINT uDeviceID, PRECEIVE_PROC_A lpReveiveProc);

UINT WINAPI DTKSetReceiveW(UINT uDeviceID, PRECEIVE_PROC_W lpwReveiveProc);

 

( DTK is just abbreviation of DeltaTau Korea... )

 

I hope it may be helps to you.

 

If you have any question about API, please do not hesitate to reply.

PowerPMAC2010Example.zip

Posted
This helps a lot thanks! Do you work for a company that paid for you to produce this? I'm wondering if we can use it without breaching intellectual property contracts and if you would be allowed to give us the source code for the library? My version of visual studio cannot interpret the comments but otherwise this works great.
Guest
This topic is now closed to further replies.

×
×
  • Create New...