Beckhoff PLC - Twin CAT

tech007

Member
Join Date
Aug 2010
Location
London
Posts
25
Hello Friends,

I am new to this forum. And I am new to field of programming of PLC as well. I used Allen Bradley before some years back and now, i have to use Beckhoff PLC for my research work.

I like to read the data from external device for the temperature control. I like to read the data and control through RS 485 port in Beckhoff PLC. The sequence of this PLC (EK 1100 PLC driver,EL6001 Interface and KL 9010 End connector). As CPU,we are using Industrial PC from Beckhoff C69xx. We are using TwinCAT here with Ether CAT field bus.

Can anybody help me to do programming with this ? Or guide me how to proccede with this task ?

I got some sample code by the company provider. Which listed below:
-------------------------------------------------------------
Timer(IN:=TRUE, PT:=T#1s);
IF Timer.Q OR Send.Busy THEN

(*Send( SendString:= '$02Hello World - $03',*)
Send( SendString:= 'S1',
TXbuffer:= TxBuffer1, (* see global variables *)
Busy=> SendBusy,
Error=> SendErrorID);

Timer(IN:=FALSE); (* reset timer *)
END_IF


Receive(
(* Prefix:= '$02',
Suffix:= '$03',
Prefix:= '$N',
Suffix:= '$R',*)
Prefix:= '$0F',
Suffix:= '$12',
Timeout:= T#1s,
ReceivedString:= ReceivedString,
RXbuffer:= RxBuffer1,
StringReceived=> StringReceived,
Busy=> ReceiveBusy,
Error=> ReceiveErrorID,
RxTimeout=> ReceiveTimeout );
IF StringReceived THEN
ReceiveCounter := ReceiveCounter + 1;
LastReceivedString := ReceivedString;
END_IF




COMportControl(
Mode:= SERIALLINEMODE_PC_COM_PORT,
pComIn:= ADR(COMin_COMport),
pComOut:= ADR(COMout_COMport),
SizeComIn:= SIZEOF(COMin_COMport),
TxBuffer:= TxBuffer1,
RxBuffer:= RxBuffer1,
Error=> COMportControlError,
ErrorID=> COMportControlErrorID );


-------------------------------------------------------

While from this programme, i understood that last coding part is for global variables for serial communication. What i should do for COM port communication ? While i can't find much detail in help menu.

Help me out through this.

Regards,
Tech007
 

Similar Topics

Hello, We are currently working on a project that involves connecting a linear potentiometer to our Beckhoff PLC. After researching, we...
Replies
2
Views
196
Morning all, we have a CP2715-0010 1.46GHz Atom running Windows 10 Enterprise (Embedded PLC with the HMI). Problem being is the performance is...
Replies
1
Views
629
At my current job we have a relatively new system that has an Allen Bradley PLC as the main controller with some local I/O, but a lot of remote...
Replies
12
Views
2,646
Hello, I was wondering if anyone know how to upload a PLC program to the Beckhoff TwinCAT 3 from a file? i.e. without having the development pc...
Replies
0
Views
755
I am trying to use my Beckhoff PLC to send emails. I am using a Gmail account that I just created. Apparently Google has removed “Less Secured...
Replies
2
Views
1,129
Back
Top Bottom