Author Topic: text box to string  (Read 2481 times)

mgaudio

  • Newbie
  • *
  • Posts: 9
    • View Profile
text box to string
« on: July 14, 2014, 05:43:13 PM »
Hi!

I think my question might be answered by the basic label manual. I can't download it anymore by going to my account? it shows I have 2 downloads left.

anyway, my question is pretty basic. I want to have a text field that can have text entered into it....and it will be stored in a string (say, ST9:0 ) on my micrologix 1100.

how would I go about doing this?


Also, I saw a really great little video demo on here where a gent had integrated a password into his program. How would I start with doing this.

I really appreciate your time, and I love this program so far......I just wish there was a beginners manual for it!


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: text box to string
« Reply #1 on: July 14, 2014, 06:35:26 PM »
There is a new feature in the latest release that will help you do this.

1) Add a BasicLabel
2) Set PLCAddressValue to ST9:0
3) Set PLCAddressKeypad to ST9:0
4) Set KeypadAlphanumeric to True
5) Run the application and click on the BasicLabel

mgaudio

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: text box to string
« Reply #2 on: July 15, 2014, 10:06:23 AM »
When I do this I get the error "object reference not set to an instance of an object"

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: text box to string
« Reply #3 on: July 15, 2014, 10:13:56 AM »
Does it give you any details such as the program file and line number?

mgaudio

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: text box to string
« Reply #4 on: July 15, 2014, 10:50:19 AM »
The error is being generated when I run the program......I have not done any programming since my visual basic class in college, so this is a bit beyond me.

When I close out of the running program demo/debug I get this in the visual studio console output:

'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x3070 has exited with code 259 (0x103).
The thread 0x2ef4 has exited with code 259 (0x103).
The thread 0x2cc8 has exited with code 0 (0x0).
The thread 0x3758 has exited with code 0 (0x0).
The thread 0x341c has exited with code 259 (0x103).
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\michael.gaudio\Desktop\HMI C\AdvancedHMI\bin\Debug\AdvancedHMI.exe'. Symbols loaded.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Cannot find or open the PDB file.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\michael.gaudio\Desktop\HMI C\AdvancedHMI\bin\Debug\AdvancedHMIDrivers.dll'. Symbols loaded.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\michael.gaudio\Desktop\HMI C\AdvancedHMI\bin\Debug\MfgControl.AdvancedHMI.Controls.dll'. Cannot find or open the PDB file.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\michael.gaudio\Desktop\HMI C\AdvancedHMI\bin\Debug\MfgControl.AdvancedHMI.Drivers.dll'. Cannot find or open the PDB file.
A first chance exception of type 'System.NullReferenceException' occurred in AdvancedHMIDrivers.dll
The thread 0x20b4 has exited with code 259 (0x103).
The thread 0x3158 has exited with code 259 (0x103).
The thread 0x2530 has exited with code 259 (0x103).
The program '[11584] AdvancedHMI.vshost.exe' has exited with code 0 (0x0).

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: text box to string
« Reply #5 on: July 15, 2014, 11:35:42 AM »
Does the label change to an error message before or after you click it?

I don't have a PLC available to test it right now. I have only been able to test on the simulator, so sorry for all the questions.

mgaudio

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: text box to string
« Reply #6 on: July 15, 2014, 02:34:54 PM »
Its no problem Archie, I appreciate your development and replies. A lot.

the error occurs before I click on the label, then it goes away. If I click on the label the keypad comes up and if I enter something into it and click the "enter" button it will show me the error again and then the error will disappear until I try it again (click on it and try entering something).

So...before And After a click.

A programmer in our office isn't very familiar with MS products, but said that "you're performing a click action on a form element" and that was the issue.....but it does come up before any click interaction.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: text box to string
« Reply #7 on: July 15, 2014, 02:45:32 PM »
Try to change PLCAddressValue to something else like N7:0

I think the problem is in the driver trying to read a string value

mgaudio

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: text box to string
« Reply #8 on: July 16, 2014, 08:20:20 AM »
that appears to be it.
Is there a modification I can make to the driver so that it can communicate string values?