Author Topic: triplc  (Read 8172 times)

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
triplc
« on: December 12, 2014, 03:16:59 PM »
Hello! i'm new to plc and need some help..

I have a triplc t100md+ that i want to control with the modbusRTU driver, i'm trying to add plcadress in advancedhmi.
But i can't get it to change outputs and trigger inputs on the plc, i guess i'm doing something wrong with plcadress,
i checked the com port and that should be the right one.

Hope someone knows what i'm doing wrong thanks!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #1 on: December 12, 2014, 04:35:59 PM »
If you add a BasicLabel and set the PLCAddressValue to a known good Modbus address, do you get any messages?

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #2 on: December 12, 2014, 04:56:54 PM »
The problem is i don't know if im adressing it right, tried basiclabel and it does not work.

Invalid address Rele2 - Conversion from string "R" to type 'integer' is not valid
« Last Edit: December 12, 2014, 05:06:03 PM by xpsarin »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #3 on: December 12, 2014, 05:54:41 PM »
Modbus addresses are typically like 40001

Your user manual should give you some kind of cross reference of your PLC addresses to Modbus addresses

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #4 on: December 12, 2014, 06:38:03 PM »
Thanks for your help so FAR! i found the addresses in the manual but now when i try one of them i get this error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

any idea what to try?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #5 on: December 12, 2014, 07:14:21 PM »
Are you using the latest version of 3.93? There have been daily updates working through some bugs in the Modbus driver after some new features were added.

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #6 on: December 12, 2014, 07:44:41 PM »
yes im using v3.93

this is what i see when i click on details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at AdvancedHMIDrivers.ModbusRTU.ModbusRTUCom.GetNextTransactionID(Int32 maxValue)
   at AdvancedHMIDrivers.ModbusBase.Write(ModbusAddress address, String[] dataToWrite)
   at AdvancedHMIDrivers.ModbusBase.Write(String startAddress, String dataToWrite)
   at AdvancedHMIControls.ThreeButtonPLC.MouseDownActon(String PLCAddress)
   at AdvancedHMIControls.ThreeButtonPLC._Click1(Object sender, MouseEventArgs e)
   at System.Windows.Forms.ButtonBase.OnMouseDown(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
AdvancedHMI
    Assembly Version: 3.9.3.0
    Win32 Version: 3.9.3.0
    CodeBase: file:///C:/Users/T%C3%B3rfr%C3%AD%C3%B0ur/AppData/Local/Apps/2.0/9K4BRZP4.ATY/JGRY8B1P.W2Q/adva..tion_6306b017ecad1fdd_0001.0000_827ffe6c8a519be0/AdvancedHMI.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.20806.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34243 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
AdvancedHMIDrivers
    Assembly Version: 3.9.3.0
    Win32 Version: 3.9.3.0
    CodeBase: file:///C:/Users/T%C3%B3rfr%C3%AD%C3%B0ur/AppData/Local/Apps/2.0/9K4BRZP4.ATY/JGRY8B1P.W2Q/adva..tion_6306b017ecad1fdd_0001.0000_827ffe6c8a519be0/AdvancedHMIDrivers.DLL
----------------------------------------
AdvancedHMIControls
    Assembly Version: 3.9.3.0
    Win32 Version: 3.9.3.0
    CodeBase: file:///C:/Users/T%C3%B3rfr%C3%AD%C3%B0ur/AppData/Local/Apps/2.0/9K4BRZP4.ATY/JGRY8B1P.W2Q/adva..tion_6306b017ecad1fdd_0001.0000_827ffe6c8a519be0/AdvancedHMIControls.DLL
----------------------------------------
MfgControl.AdvancedHMI.Controls
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/T%C3%B3rfr%C3%AD%C3%B0ur/AppData/Local/Apps/2.0/9K4BRZP4.ATY/JGRY8B1P.W2Q/adva..tion_6306b017ecad1fdd_0001.0000_827ffe6c8a519be0/MfgControl.AdvancedHMI.Controls.DLL
----------------------------------------
MfgControl.AdvancedHMI.Drivers
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/T%C3%B3rfr%C3%AD%C3%B0ur/AppData/Local/Apps/2.0/9K4BRZP4.ATY/JGRY8B1P.W2Q/adva..tion_6306b017ecad1fdd_0001.0000_827ffe6c8a519be0/MfgControl.AdvancedHMI.Drivers.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #7 on: December 12, 2014, 08:18:19 PM »
Did you try a BasicLabel with a known valid Modbus address in PLCAddressValue? The BasicLabel is the best for showing connection issues.

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #8 on: December 12, 2014, 08:22:57 PM »
When i use basiclabel and put in address 40001.1 which should be input or 40017.1 which is the output it just says basiclabel

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #9 on: December 12, 2014, 08:25:19 PM »
Do you have your programming software shut down, so AdvancedHMI can't get access to the port?

On your ModbusRTUCom1 driver instance, do all the settings match what you use in your programming software (e.g. BaudRate, Parity, StopBits, PortName)?

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #10 on: December 12, 2014, 08:30:35 PM »
BaudRate was not the same as the plc, but that did not make any changes.
What should the BasicLabel show me?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #11 on: December 12, 2014, 08:50:29 PM »
If everything is good, it will show the value of the register in PLCAddressValue. If not, it should show the error, such as "COM1 cannot be opened"

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #12 on: December 12, 2014, 08:55:04 PM »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #13 on: December 12, 2014, 08:58:15 PM »
Try reading a full word with 40017 to see if you get any result.

The bit level reading feature was recently added and may still have some bugs that need worked out

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #14 on: December 12, 2014, 09:02:54 PM »
Tried 40017 and 400171 still nothing, proably just me doing something wrong