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

Hi, I'm trying to import a Rockwell/AB EDS to Beckhoff but I'm not sure how to import/install the EDS. It is a PowerFlex 525 EDS. Is there a way...
Replies
1
Views
52
I'm trying to integrate a Beckhoff IPC with a Controllogix PLC. There is some documentation, on the Beckhoff website, on how to do a PLC-PLC comms...
Replies
0
Views
82
Hello, We are currently working on a project that involves connecting a linear potentiometer to our Beckhoff PLC. After researching, we...
Replies
2
Views
206
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
650
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,679
Back
Top Bottom