Configuration | Acyclic communication via Explicit Messaging Attribute Single . Create an array at Destination Element that receives the acyclic messages. The size of the array is to be chosen according to the receiving messages. р The following sample code sends requests to the EtherNet/IP™ driver of the TF6280, which forwards them to the TwinCAT PLC for further processing. A single attribute value is read from the TwinCAT PLC with a positive edge at "bGet". In this sample the values "TestReadOnlyAttribute1, TestReadOnlyAttribute2 and TestReadOnlyAttribute3" can be read. A single attribute value is written to the TwinCAT PLC with a positive edge at "bSet".
In this sample the fourth attribute in the TwinCAT PLC can be described with the content "123Beckhoff567" and "HelloBeckhoff". //GetAttribute IF bGet THEN bGet:=0; iCase:=20+iGet; END_IF; //SetAttribute IF bSet AND iOldCase=5 THEN bSet:=0; iCase:=6; ELSIF bSet AND iOldCase=6 THEN bSet:=0; iCase:=5; END_IF; CASE iCase OF 5: //HelloBeckhoff --> (ASCII) iOldCase:=iCase; TxData[0]:=72; //H TxData[1]:=101; //e TxData[2]:=108; //l TxData[3]:=108; //l TxData[4]:=111; //o TxData[5]:=66; //B TxData[6]:=101; //e TxData[7]:=99; //c TxData[8]:=107; //k TxData[9]:=104; //h TxData[10]:=111; //o TxData[11]:=102; //f TxData[12]:=102; //f iCase:=10; 6:
//123Beckhoff567 --> (ASCII) iOldCase:=iCase; TF6281 49 Version: 1.9.0