SINUMERIK CNC automation systems
I have sinumerik 840D controller. interested in collecting axis data real-time
Thread Starter: prasang Started: 9/18/2009 7:47 PM Replies: 4

9/18/2009, 7:47 PM
|
Joined 4/5/2009
Last visit: 12/2/2012
Posts: 2
Rating:
(0)
|
(0)
|
=== Edited by O_Moderator @ 9/22/2009 11:14 AM [GMT ] === new subject after splitting
|
|
|
|
|

9/22/2009, 11:38 AM
|
Joined 2/22/2008
Last visit: 4/29/2013
Posts: 40
Rating:
(4)
|
(0)
|
|
|
|
|

9/8/2011, 9:39 PM
|
Joined 8/24/2011
Last visit: 7/29/2012
Posts: 5
Rating:
(0)
|
(0)
|
Hello. I hope this will help you is easier than readit There is a way to send data to the PLC from CNC, and viceversa PLC to CNC they are variables forget the name by now. they are 1024 Word Variables but you can transfer data on any lenght, with one of these [n] number of the variable (1..1024) $A_DBB[n] $A_DBW[n] $A_DBD[n] $A_DBR[n] and in the plc side you just have to use a Function Called FC21. ----------------------------------------------------------------------------------------------------------------------------------------- CALL FC 21 Enable :=L12.1 Funct :=B#16#3 S7Var :="PLC-NCK".NC_PLC_Possition_track IVAR1 :=354 IVAR2 :=-1 Error :=#FC_21ERROR ErrCode:=#FC_21ERROR_CODE _003: NOP 0
-------------------------------------------DESCRIPTION OF FC21---------------------------------- -Enable= as most functions you can decide whe to use it - Funct= B#16#3 to read data in PLC from CNC or B#16#4 to write data to CNC from PLC - S7Var= The place in PLC where you want to write the data coming from CNC for example any of those MB[n] or MW[n] or MD[n] DB[x].DBB[y] or DB[x].DBW[y] or DB[x].DBD[y] you can place the data comming from CNC as you need it.
.IVAR1 = just the number you used at CNC to send data ($A_DBW[354] as in the example) IVAR2 = -1 always minus one, (there are to many uses for FC21 but for experience it has had always worked using -1 to read and to write) Error= A bit if something was wrong with FC21 you have to put any bit there (M[x.x]) or some DBX[m.n] ErrorCode= the number of Error happened.here you have to put any MW or DBW type integer. ------------------------------------------------END OF DESCRIPTION-------------------------------------------------------
Well with this information we are ready to start with another concept, SYNCHRONUS ACTIONS
basically a synchronus action is a trik that allow the machine to be doing certain things in the background it does not matters if the machine is reading diferent blocks or doing anything else at the same time, a sinchonized action will do it once you enable it
these Synchronus Actions only 255 and you can see wich ones are available as follows (PCU50)
-MENU SELECT - MACHINE DATA [ > ] RIGHT ARROW -SYNCHRON.ACTIONS There is a list of all the decleared Sync Actions and also tells you wich ones are active at this moment.
BACK TO YOUR QUESTION.
I will Create a Subprogram.SPF as Follows
SYNCHRO.SPF
N20 IDS=254 DO $A_DBR[500]= $AA_IM[X] ;(position of Xaxis regarding machine) N30 IDS=255 DO $A_DBR[500]= $AA_IW[X] ;(position of Xaxis regarding work piece offcets G54) N40 M17
THEN YOU HAVE TO CALL THIS SUB PROGRAM FROM ANY OTHER YOU HAVE TO DECIDE WICH EVENT WILL ACTIVATE YOUR IDS´s
CAN BE IN YOUR MAIN SEQUENCE COORDINATOR
JUST YOU HAVE TO PUT THE NAME AND THE MACHINE WILL READ IT AND ENABLE THOSE VARIABLES SO YOU CAN SE CONTINUOSLY WHERE YOUR AXIS ARE. ... .... .... N330 SYNCHRO .... ... M30
HOPE IT HELP
|
|
|
|

9/9/2011, 2:07 AM
|
Joined 11/20/2008
Last visit: 7/26/2012
Posts: 4
Rating:
(0)
|
(0)
|
If you have aleady PCU50 in which installed HMI-Advanced, you don't need to buy any other program. OPC-server is on the HMI-Advanced program. So on your laptop, you olny execute OPC-client. OPC-client program is free. So search that on Google. Because the driver of HMI-Advanced use DCTL, tag of OPC-client must be the type of '/NCK/MachineAxis/measPos2[1]'
wish sb luck..
=== Edited by contravia @ 9/9/2011 2:12 AM [GMT ] ===
|
|
|
|
|

8/7/2012, 4:14 AM
|
Joined 4/5/2009
Last visit: 12/2/2012
Posts: 2
Rating:
(0)
|
(0)
|
Apologies for delayed follow-up. my requirments are still live...
To be clear:
A. I have 840D+HMI Advanced+PCU 50 connected to a CNC machine B. I also have a stand alone PC with Win XP
I wany to connect A & B to get Machine data, Axis data etc. real-time for trend plot, trajectory plot, collision check etc.
Can you suggest:
1. How do I physically connect these two. RS 232 or Ethernet ? 2. How do i check if OPC server is running on the Sinumerik. 3. How do i query the OPC server from my PC. Name of server, Tag name of variable, etc ( i prefer not to buy HMI programming package or other software without understanding the basics.)
thanks a lot for any advice in this regard.
~prasanna
|
|
|
|
Actions