Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
2.00/5 (4 votes)
See more:
IF NOT data.big_or_small THEN
FOR jj:=1 TO 4 DO
FOR ii :=1 TO 6 DO
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].TrackNumber:=ii;
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].FirstOnPosition:=INT_TO_REAL(240*(jj-1))+INT_TO_REAL(40*(ii-1));
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].LastOnPosition:=INT_TO_REAL(240*(jj-1))+INT_TO_REAL(40*(ii-1))+data.quyang_pos;
END_FOR
END_FOR
ELSE
FOR jj:=1 TO 2 DO
FOR ii :=1 TO 6 DO
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].TrackNumber:=ii;
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].FirstOnPosition:=INT_TO_REAL(480*(jj-1))+INT_TO_REAL(80*(ii-1));
master6_MC_CAMSWITCH_TR[ii+(jj-1)*12].LastOnPosition:=INT_TO_REAL(480*(jj-1))+INT_TO_REAL(80*(ii-1))+data.quyang_pos;
END_FOR
END_FOR
END_IF
updown_MC_MoveVelocity(
Execute:= M_R_TRIG2.Q ,
Velocity:= Data.g_r_updownvelocity_M,
Acceleration:= 1000,
Deceleration:= 1000,
Direction:= ,
Axis:= updown,
InVelocity=> ,
CommandAborted=> ,
Error=> ,
ErrorID=> );
Posted
Updated 2-Jan-13 16:07pm
v2
Comments
bbirajdar 2-Jan-13 8:14am    
Oh.. It is code? I thought its scrap....
Sergey Alexandrovich Kryukov 2-Jan-13 16:03pm    
Apparently, the letter 's' in the last word looks quite foreign here. :-)
—SA
Abhinav S 2-Jan-13 8:27am    
Your question is quite unclear.
San Dra 2-Jan-13 10:02am    
It's not w web language either
Sergey Alexandrovich Kryukov 2-Jan-13 16:06pm    
For your information, the syntax reminds Algol or Pascal, with a number of syntax bugs... There is absolutely no sense in considering such posts.
—SA

i think that you need to look at PLC Programming (Programmable Logic Controller)


Beckhoff PLC Training Series

TwinCAT PLC programming

a youtube video..


I hope that it will help you to start ...
 
Share this answer
 
It is a language defined as IEC-61131-3 for industrial controlers (PLCs, Servo controls etc.) More info can be found here:

http://en.wikipedia.org/wiki/IEC_61131-3

The #1 compiler used for this language is from Codesys:

http://www.codesys.com/
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900