Commit 34689e4f authored by claes's avatar claes

IpCollect and IpDistribute added

parent 7e7ad06b
/*
* Proview $Id: rt_plc_data.c,v 1.5 2005-10-18 05:10:56 claes Exp $
* Proview $Id: rt_plc_data.c,v 1.6 2007-10-15 12:12:18 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -78,6 +78,24 @@ void ApCollect_exec(
}
}
/*_*
@aref ipcollect IpCollect
*/
void IpCollect_exec(
plc_sThread *tp,
pwr_sClass_IpCollect *object)
{
int i;
pwr_tInt32 **InP;
for ( i = 0; i < object->MaxIndex; i++)
{
InP = (pwr_tInt32 **) ((char *) &object->IpIn1P +
i * (sizeof(object->IpIn1) + sizeof(object->IpIn1P)));
object->Ip[i] = **InP;
}
}
/*_*
@aref dpdistribute DpDistribute
*/
......@@ -102,6 +120,18 @@ void ApDistribute_exec(
min( object->MaxIndex, 24) * sizeof(pwr_tFloat32));
}
/*_*
@aref ipdistribute IpDistribute
*/
void IpDistribute_exec(
plc_sThread *tp,
pwr_sClass_IpDistribute *object)
{
if ( *object->DataInP)
memcpy( &object->IpOut1, *object->DataInP,
min( object->MaxIndex, 24) * sizeof(pwr_tInt32));
}
/*_*
@aref datacollect DataCollect
*/
......
/*
* Proview $Id: rt_plc_data.h,v 1.3 2006-06-29 10:53:47 claes Exp $
* Proview $Id: rt_plc_data.h,v 1.4 2007-10-15 12:12:18 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -22,5 +22,6 @@
typedef pwr_tBoolean pwr_sDpDistribute[24];
typedef pwr_tFloat32 pwr_sApDistribute[24];
typedef pwr_tInt32 pwr_sIpDistribute[24];
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment