General Category > Support Questions

Pulling a string from a CompactLogix...

<< < (3/3)

JasonT:
Here is the entire output log...



--- Quote ---'WARREN 5805.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WARREN 5805.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'D:\Current Projects\JOBS\WARREN\CMT LASER\HMI\AdvancedHMI\bin\Debug\WARREN 5805.exe'. Symbols loaded.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.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.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.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.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.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.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'D:\...\HMI\AdvancedHMI\bin\Debug\AdvancedHMIDrivers.dll'. Symbols loaded.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'D:\...\HMI\AdvancedHMI\bin\Debug\MfgControl.AdvancedHMI.Drivers.dll'. Module was built without symbols.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'D:\...\HMI\AdvancedHMI\bin\Debug\AdvancedHMIControls.dll'. Symbols loaded.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'D:\...\HMI\AdvancedHMI\bin\Debug\MfgControl.AdvancedHMI.Controls.dll'. Module was built without symbols.
'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Cannot find or open the PDB file.
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll
Value as Hex string=65
Exception thrown: 'System.ArgumentException' in mscorlib.dll
An exception of type 'System.ArgumentException' occurred in mscorlib.dll but was not handled in user code
Destination array is not long enough to copy all the items in the collection. Check array index and length.

'WARREN 5805.exe' (CLR v4.0.30319: WARREN 5805.exe): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

--- End quote ---

Archie:
The Value is only a 65, so it can't be reading a custom length string. Any custom length string will return at least 8 characters such as 01000000, which represents the length in hex format, then there will be the number of hex values representing the characters.

Are you completely sure the tag you are reading is a custom length string?

Archie:
I think I may be leading you down the wrong path because I may be misunderstanding the goal.

If you look at the string in RSLogix, do you see '65' ?

JasonT:
The tag I am reading is only part of the string. The string is WX,OK,A,W5G18023$r$1D14198085 and the .DATA[6] is the tag that I am reading which is the character "A" in the string.
Since that is the only information I need from that string, that is the tag I used

Archie:
Ok. So I completely misunderstood and went down the totally wrong path. This will be much simpler.

Where you had this code:

Label1.Text=ExtractString(BasicLabel1.Text)

Change it to this:

Label1.Text=chr(BasicLabel1.Text)

Navigation

[0] Message Index

[*] Previous page

Go to full version