Henon Research

MrPLC Member
  • Content count

    17
  • Joined

  • Last visited

Posts posted by Henon Research


  1. File Name: Real to Fraction File Submitter: Henon Research File Submitted: 21 Feb 2012 File Updated: 22 Feb 2012 File Category: PLC Sample Code Add-On Instruction Float to Fraction FTF this Add-On convert a real to Fraction. Add Documentation inside the file. Good work. Click here to download this file

  2. File Name: Complex numbers for Allen-Bradley File Submitter: Henon Research File Submitted: 08 Feb 2012 File Updated: 09 Feb 2012 File Category: PLC Sample Code to apply the mathematics of complex numbers,<BR closure_uid_n926ba="1383" Pc="null">also on plc.<BR closure_uid_n926ba="1384" Pc="null">I send you some Add-On Instructions for dealing with complex numbers this for RsLogix5000 and Siemens S7 Click here to download this file

  3. File Name: Solve system whit Gauss-Jordan File Submitter: Henon Research File Submitted: 06 Jun 2011 File Updated: 07 Jun 2011 File Category: PLC Sample Code In the matrix A [ i , j ] put the System of N-Equation. In the vector b put the solutions §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ Example 1: Linear System 3 equation (X,Y,Z) 3 X + 2 Y - Z = 10 - X + Y + Z = -2 2 X - Y + 2 Z = -6 | 3 | | 2 | | -1 | | 10 | X | -1 | + Y | 1 | + Z | 1 | = | -2 | | 2 | | -1 | | 2 | | -6 | Matrix A := Matrix[1,1]= 3 ; Matrix[1,2]= 2 ; Matrix[1,3]= -1 Matrix[2,1]= -1 ; Matrix[2,2]= 1 ; Matrix[2,3]= -2 Matrix[3,1]= 2 ; Matrix[3,2]= -1 ; Matrix[3,3]= -6 Vector b:= Vector[1] =10 ; Vector[2] = -2 ; Vector[3] = -6 ; Solution := Solution [1] := 1.0 ; Solution [2] := 2.0 ; Solution [3] := -3.0 ; X = 1 ; Y = 2 ; Z = -3 §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ Example 2: Linear System 5 equation for resolve Polynomial 4th grade exampl. Polynomial whit 5 points: P0(-1,-1) ; P1( 1, 3) ; P2( 5, 3.5) ; P3( 6, 4.5) ; P4( 7, 7) ; Write in the Matrix A [ i, j ] Matrix A := Matrix[1,1]= (-1)^4 ; Matrix[1,2]= (-1)^3 ; Matrix[1,3]= (-1)^2 ; Matrix[1,4]= (-1) ; Matrix[1,5]=1; Matrix[2,1]= (1)^4 ; Matrix[2,2]= (1)^3 ; Matrix[2,3]= (1)^2 ; Matrix[2,4]= (1) ; Matrix[2,5]=1; Matrix[3,1]= (5)^4 ; Matrix[3,2]= (5)^3 ; Matrix[3,3]= (5)^2 ; Matrix[3,4]= (5) ; Matrix[3,5]=1; Matrix[4,1]= (6)^4 ; Matrix[4,2]= (6)^3 ; Matrix[4,3]= (6)^2 ; Matrix[4,4]= (6) ; Matrix[4,5]=1; Matrix[5,1]= (7)^4 ; Matrix[5,2]= (7)^3 ; Matrix[5,3]= (7)^2 ; Matrix[5,4]= (7) ; Matrix[5,5]=1; Write in the Vector [ ] Vector b:= Vector[1] = -1 ; Vector[2] = 3 ; Vector[3] = 3.5 ; Vector[4] = 4.5 ; Vector[5] = 7 Solutions := Solution [1] := 3.27380234e-003 ; Solution [2] := 0.03363105; Solution [3] := -0.56577414 ; Solution [4] := 1.966369 ; Solution [5] := 1.5625005 §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ Example 3: Linear System 6 equation for resolve Polynomial 5th grade example. Mototion Interpolation whit Polynomial whit 2 Points : P0 (Time0, Position 0) Start point whit (Velocity 0, Acceleration 0) P1 (Time1, Position 1) End point whit (Velocity 1, Acceleration 1) Write in the Matrix A [ i, j ] Matrix A := X0 = time0 ; X1 = time1 Row1 X0 ^5 + X0 ^4 + X0 ^3 + X0 ^2 + X0 + 1 (Position P0) Row2 5 * X0 ^4 + 4 * X0 ^3 + 3 * X0 ^2 + 2 * X0 + 1 + 0 (Velocity P0) Row3 20 * X0 ^3 + 12 * X0 ^2 + 6 * X0 + 2 + 0 + 0 (Acceleration P0) Row4 X1 ^5 + X1 ^4 + X1 ^3 + X1 ^2 + X1 + 1 (Position P1) Row5 5 * X1 ^4 + 4 * X1 ^3 + 3 * X1 ^2 + 2 * X1 + 1 + 0 (Velocity P1) Row6 20 * X1 ^3 + 12 * X1 ^2 + 6 * X1 + 2 + 0 + 0 (Acceleration P1) Vector b:= Vector[1] = Position P0 ; Vector[2] = Velocity P0 ; Vector[3] = Acceleration P0 ; Vector[4] = Position P1 ; Vector[5] = Velocity P1 ; Vector[6] = Acceleration P1 ; Interpolation Polynomial Position := Position := s1* t^5 + s2* t^4 +s3* t^3 + s4* t^2 + s5* t + s6; Click here to download this file

  4. File Name: Solve system whit Gauss-Jordan File Submitter: Henon Research File Submitted: 06 Jun 2011 File Category: PLC Sample Code This Add-On Instruction Solve the equations System whit Gauss-Jordan Reduction In the matrix A [ i , j ] put the System of N-Equation. In the vector b put the solutions §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ Example 1: Linear System 3 equation (X,Y,Z) 3 X + 2 Y - Z = 10 - X + Y + Z = -2 2 X - Y + 2 Z = -6 | 3 | | 2 | | -1 | | 10 | X | -1 | + Y | 1 | + Z | 1 | = | -2 | | 2 | | -1 | | 2 | | -6 | Matrix A := Matrix[1,1]= 3 ; Matrix[1,2]= 2 ; Matrix[1,3]= -1 Matrix[2,1]= -1 ; Matrix[2,2]= 1 ; Matrix[2,3]= -2 Matrix[3,1]= 2 ; Matrix[3,2]= -1 ; Matrix[3,3]= -6 Vector b:= Vector[1] =10 ; Vector[2] = -2 ; Vector[3] = -6 ; Solution := Solution [1] := 1.0 ; Solution [2] := 2.0 ; Solution [3] := -3.0 ; X = 1 ; Y = 2 ; Z = -3 §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ Example 2: Linear System 5 equation for resolve Polynomial 4th grade exampl. Polynomial whit 5 points: P0(-1,-1) ; P1( 1, 3) ; P2( 5, 3.5) ; P3( 6, 4.5) ; P4( 7, 7) ; Write in the Matrix A [ i, j ] Matrix A := Matrix[1,1]= (-1)^4 ; Matrix[1,2]= (-1)^3 ; Matrix[1,3]= (-1)^2 ; Matrix[1,4]= (-1) ; Matrix[1,5]=1; Matrix[2,1]= (1)^4 ; Matrix[2,2]= (1)^3 ; Matrix[2,3]= (1)^2 ; Matrix[2,4]= (1) ; Matrix[2,5]=1; Matrix[3,1]= (5)^4 ; Matrix[3,2]= (5)^3 ; Matrix[3,3]= (5)^2 ; Matrix[3,4]= (5) ; Matrix[3,5]=1; Matrix[4,1]= (6)^4 ; Matrix[4,2]= (6)^3 ; Matrix[4,3]= (6)^2 ; Matrix[4,4]= (6) ; Matrix[4,5]=1; Matrix[5,1]= (7)^4 ; Matrix[5,2]= (7)^3 ; Matrix[5,3]= (7)^2 ; Matrix[5,4]= (7) ; Matrix[5,5]=1; Write in the Vector [ ] Vector b:= Vector[1] = -1 ; Vector[2] = 3 ; Vector[3] = 3.5 ; Vector[4] = 4.5 ; Vector[5] = 7 Solutions := Solution [1] := 3.27380234e-003 ; Solution [2] := 0.03363105; Solution [3] := -0.56577414 ; Solution [4] := 1.966369 ; Solution [5] := 1.5625005 §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ Example 3: Linear System 6 equation for resolve Polynomial 5th grade example. Mototion Interpolation whit Polynomial whit 2 Points : P0 (Time0, Position 0) Start point whit (Velocity 0, Acceleration 0) P1 (Time1, Position 1) End point whit (Velocity 1, Acceleration 1) Write in the Matrix A [ i, j ] Matrix A := X0 = time0 ; X1 = time1 Row1 X0 ^5 + X0 ^4 + X0 ^3 + X0 ^2 + X0 + 1 (Position P0) Row2 5 * X0 ^4 + 4 * X0 ^3 + 3 * X0 ^2 + 2 * X0 + 1 + 0 (Velocity P0) Row3 20 * X0 ^3 + 12 * X0 ^2 + 6 * X0 + 2 + 0 + 0 (Acceleration P0) Row4 X1 ^5 + X1 ^4 + X1 ^3 + X1 ^2 + X1 + 1 (Position P1) Row5 5 * X1 ^4 + 4 * X1 ^3 + 3 * X1 ^2 + 2 * X1 + 1 + 0 (Velocity P1) Row6 20 * X1 ^3 + 12 * X1 ^2 + 6 * X1 + 2 + 0 + 0 (Acceleration P1) Vector b:= Vector[1] = Position P0 ; Vector[2] = Velocity P0 ; Vector[3] = Acceleration P0 ; Vector[4] = Position P1 ; Vector[5] = Velocity P1 ; Vector[6] = Acceleration P1 ; Interpolation Polynomial Position := Position := s1* t^5 + s2* t^4 +s3* t^3 + s4* t^2 + s5* t + s6; Click here to download this file

  5. Hi guys This my opinion: Before you create the master virtual axle, and after lockup your two axis whit gearing instruction “MAG” . Master command Reference to Virtual Axle From Virtual Axle to Real Master (Axle1). From Virtual Axle to Slave (Axle2) Virtual Master =? Axle 1 MAG(Slave1,Master,Gear_Ctrl,0,1.0,1,1,Command,Real,Disabled,100,% of Maximum) Virtual Master =? Axle 2 MAG(Slave2,Master,Gear_Ctrl,0,1.0,1,1,Command,Real,Disabled,100,% of Maximum) For Axle 1 put on Properties-Axis / Limit set “Position Error Tolerance” to correct value detect from auto-tune For Axle 2 put on Properties-Axis / Limit set “Position Error Tolerance” to high value (Limit Axis1 multiply for 5 ) In this way the Axis 2 (Slave) isn’t possible to go “Error-Position” . After you check the actual Error-Position of Axle2, and compare this error to Trigger-Tolerance position. When the absolute error-position is over the your Trigger-Tolerance position, you must actualized correction whit Motion Axis Move instruction “MAM” over the Gearing instruction MAG+MAM In this way you can possible Repartition Torque reference to slave Axle.

  6. Hi Gentlemen, ask if you realized Connection among PanelView Plus with a PLC Siemens S7 in Ethernet, the KepServer using Ethernet to the PanelView. I premise that Making a will the PC Project in Simulation with the KepServer Enterprise V4.0 works. However then when I transfer the lines compiled to the PanelView, it doesn't work me. The Firmware Installed on the PanelView is the Version V4.06 (I have Installed the Options S7-TCP/IP for the KepServer) and I have adjourned the to Sign. I have Already tried the same configuration in MPI (+Adapter RS232/MPI) with success however the Ethernet doesn't work. Can you help me? Thanks.

  7. Yes it is possible in Siemens SCL? You made the struct in a DB. The struct contains your data this is your DB example DB10 Before you create UDT example 10 (Create new Source.File) Source1.File // Make Your UDT10 Type UDT10 Structur Limit : REAL; // Limit of your Device Max : INT; // Max Value Time : S5Time; // data Time for your use End_Structur // Make Your UDT11 Type UDT11 Structur Device: INT; // Number of Device Param: Array[1..50] of UDT10; // Structur of your Parameters End_Structur // Make Your DB10 Data_Block DB10 UDT11 Begin Source2.File FUNCTION_BLOCK FCB10 Title = 'Test' // Test for this Example // // Version : '1.0' Author : 'HenonR' Name : Test Family : Examp VAR_INPUT Point1: INT; // Pointer 1st Element Point2: INT; // Pointer 2nd Element Block: UDT11; // data Block (Inser DB10) Param: INT; // Number of Parameter Device: INT; // Number of Device Limit: REAL; // Limit Value END_VAR VAR_OUTPUT MAX: REAL; // Max value END_VAR BEGIN MAX := Block.Param[Point1].Max; Block.Device := Device; Block.Param[10].Limit := Limit; END_FUNCTION_BLOCK This is a Example for Insert Input (Block) you use an other FC or FB in SCL, because in KOP,FUP,AWL is very Hard. FUNCTION FC11: REAL BEGIN FB10,DB20 ( Point1:= 1 ,Point2:= 2 ,Block:= DB10 ,Param:= 3 ,Device:= 1 ,Limit := 0.768 , MD100 := MAX); FC11 := MAX; // RETURN Value of Function FC11 OK := True; END_FUNCTION