Problem in developing Channel Driver for Omron PLC

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
heony
Posts:1
Joined: Thu Jan 20, 2011 3:30 am

Problem in developing Channel Driver for Omron PLC

Post by heony »

I am making OMRON(CS1G_CPU44, FINS protocol) driver-manager, with the tool and environment you supplied.
My WINCC OA Version is 3.12, and I am doing this job with VC2010, 64-bit environment.
And I am doing this programming, using the project \\\\WinCC_OA\\3.12\\api\\TcpDrv\\TcpDrv.vcxproj, which is kindly included in your package.

Last week, I succeeded in communicating with the OMRON Ethernet card.
Every scan time, I can read 800-words from OMRON and inserted them to my data-structure (more specifically, STL-MAP data-structure).

But This week, I am struggling to solve the problem.
The problem is, I cannot know how to transfer My OMRON-DATA to PVSS-DP(data-point) variables.

One of my try is using the class, HWMapper, and below box has the part of my code.
----
--- My code ---
HWMapper *pMapper = (HWMapper *)DrvManager::getHWMapperPtr();

for( HWObject *pHWObject = (HWObject *)pMapper->getFirstHWObj(); pHWObject != NULL; pHWObject = pMapper->getNextHWObj() )
{
std::cerr

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Problem in developing Channel Driver for Omron PLC

Post by leoknipp »

Hello,

I'm not an API-specialist.
For transferring data to the original value you need a dp-element with an _address-config defined as input address.
As far as I've seen from the C++ code for the common driver the functions processData2Dp and sendData2Dp are called to write data to the original value.

Best Regards
Leopold Knipp
Senior Support Specialist

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Problem in developing Channel Driver for Omron PLC

Post by Gertjan van Schijndel »

The 'Transformation' class is responsable for transforming external data to pvss variables. More information regarding this class can be found in the api docu/header files and the online help under: Special functions -> API -> ComDrv driver -> Transformation.
The data can be send to pvss by the 'DrvManager::toDp' function.

3 posts • Page 1 of 1