Skip to main content

Posts

VBScript Error Handling -- different from VBA

     'On Error GoTo ErrHandler      ' TODO: Add your code here      ' final code           On   Error   Resume   Next      Dim  FolderName     FolderName =  "M100x"      Dim  FolderName1     FolderName1 =  Trim (FolderName)          'ENSURE THAT FOLDER NAME CORRESPONDING TO WINDING SR NO IS CREATED AND CONTAINS THE FILE MeasLog.csv      'ENSURE THAT THE SAME WINDING SR NO IS ENTERED IN THE HMI FIELD D4502              Dim  outputString      Dim  outputFile      Dim  inputFile      Const  ForWriting =  2      Const  ForReading =  1      Set  objFSO =  CreateObject ( "Scripting.FileSystemObject" )      Set  outputFile = objFSO.CreateTextFile( "F:\csv\"  +  "Logger.csv" , ForWriting,  True )     outputFile.WriteLine FolderName1      Set  inputFile = objFSO.OpenTextFile( "F:\csv\"  + FolderName1 +  "\MeasLog.csv" , ForReading)           If  Err.Number <>  0   Then      MsgBox   "Error No:"  ...

The VISA Interface

The VISA Interface Adding the TekVisa ActiveX Control to VB Use the VB Object Browser to view Functions of the ActiveX

KEB Drive Settings

Dynamometer Settings : Ud02 = 11 F5-S/500rpm  "S=> Servo" Enc00 = 14 Sin/Cos Enc01 = 2048 Enc02 = 2206 + Start Command for Encoder Tuning Dr23 = 15A  PM Rated Current. Ensure that "PM" is displayed and not "IM" set Ud02 accordingly ( lower value set due to common MCB limitations ) Dr24 = 120 rpm Dr25 = 18 Hz Dr27 = 800Nm Dr28 = 25A ( lower value set due to common MCB limitations ) Dr32 = 10KW Dr48 = 7 Auto Identification w/o move + Start Command for Motor Eq Ckt Tuning Cs00 = 4 Speed Control Closed Loop Cs01 = 0 encoder 1 + off Cs05 = 0 variable Speed Kp/Ki Cs06 = 100 Cs09 = 20 Cs15 = 2 for abs Nm Torque in Cs19, = 3 for Cs19 * Cs18 (%) op00 =2 Digital Command Source op03 op01 = 7 Sign of Command op02 = 0 Low Speed stopped op03 = set speed 120 rpm  for Motor Mode op03 = 0 rpm for Generator Mode

Mitsubishi Servo Configuration

Servo parameters PA01   0001 - Position Mode PA02   00 - Regen not required PA04   xx  Elect Mag Brake PA05   1000 No. of command pulses per rev PA06   1  Electronic Gear Numerator    ( PA21  1001 - enable Elec. Gear ) PA07   1  Electronic Gear Denominator PA08   x Auto tuning PA09  x PA10   225 In Pos Range PA11   30% Fwd Torque  Limit PA12  30%  Rev Torque Limit PA13  210  Pulse Train Type PA14           Rot Dir CW / CCW PD30 0010  = prevent shut-off of base ckt when alarm reset is pressed in healthy condition PA05 = 1000 No. of command pulses per rev of the Servo Motor Shaft with a 45 gear box this means that one revolution of the Drive Shaft will be 45,000 revolutions of the servo shaft 1 rps = 60 rpm = 45,000 pulses for the servo system 40 rpm = 30,000 pulses  ==> 1st...

FX5U PLC Module Settings

FX5U-4AD-PT-ADP FX5U-8AD

Scada Notes

Q1. How do we have local variables on the PC ( not PLC ) that are accessible by all the different Iconics Applications ? A1. Configure Items in Unified Data Manager so that the item is accessible by the GraphWorX  as well as ScriptWorX Example : UDMConfig --> Registers (New Bool1, Writeable) ____________________________________________________________________________ Q2. How do we log PLC Item data to a .csv file Trigger Tag is created  in UDMConfig --> Registers (New Bool1, Writeable) Configure Tag as reg:Bool1 Trigger is configured in the UDMConfig --> Event trigger --> Data Trigger (New) -> Data Trigger Options Name : Bool1ChgTrig ( Trigger Name ) Condition : Execute when Tag changes to TRUE Data Tag : reg:Bool1 In ScriptWorX2010 create a Thread, then create a script below it Ensure that the script is stopped -  "RED TRAFFIC LIGHT" must be ON in ScriptWorX Script : NewScript Trigger Name : trg_data: Bool1ChgTrig Click the "App...

GXWorks3 GXDeveloper3 Notes

Set Device comment using Navigation Tree View -> Device-> Common Device Comment Q1. Blinking erratic display of values when choosing Controller Type : FX A1. Communication issue between the GS2110 HMI and the FX5U PLC over ethernet was resolved by the following settings : System Tree View -> Controller Setting ->CH1-> Controller Type : Melsec iQ-F , I/F : Ethernet Multi Unit type : FX5CPU, IP Address : 192.168.1.17, Port : 5562, Communication TCP Q2. When communication between the FX5U PLC and the GS2110 HMI was established the GXWorks3 Programming software was unable to go online with the PLC - gives communication error A2. The PLC connection set to "Direct" and not "Via Hub" Q3  Unable to establish simultaneous communication to FX5U PLC with SCADA (MX OPC Server ) and HMI ( GS2110 ) Need to add Melsoft  device to correspond to the HMI as shown below Q4. Functions and Function Blocks Functions :  1. Do not get i...