Author Topic: Links for downloadable tutorial videos  (Read 3856 times)

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Links for downloadable tutorial videos
« on: October 06, 2016, 06:10:03 AM »
Is there a weblink for downloadable AdvancedHMI tutorial videos?

I know they exist on youtube but it causes problems when trying to view them in a work environment. What I really need is to view the videos off-line on the laptop containing the AdvacedHMI application

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Links for downloadable tutorial videos
« Reply #1 on: October 06, 2016, 08:25:47 AM »
Unfortunately these videos are only available on YouTube. There are some web sites that will let you download videos from YouTube, but I do not have any recommendations on which is better and you will probably still need access to YouTube for them to work.

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #2 on: October 06, 2016, 09:34:18 AM »
That is a pity. It's kind of what I expected.

Anyway I'm stuck on trying to send push button commands from AdvancedHMI to the PLC. Have you got any advice as I getting confused?
I think the 'PLCAddressClick' field is for the tag (or alias name). I've got no idea what the 'PLCAddressVisible' field does. Do I have to add some code as well using the 'EthernetIPforCLXCom1.Write' command?

On the plus side I can read back PLC values no problem - did it 1st time with minimal effort using a panel meter.

And yes, I think this product is a great find. It's got good potential.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Links for downloadable tutorial videos
« Reply #3 on: October 06, 2016, 09:43:57 AM »
As a general rule, the properties PLCAddress**** will be directly associated to a property. For instance, PLCAddressVisible tells it to read a value from the PLC and put the resulting value in the Visible property.

For action/writing this rule does not apply. As you will note there is not Click property. By putting a valid PLC address in PLCAddressClick, it will write a value to that register based on the OutputType property.

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #4 on: October 11, 2016, 03:44:47 AM »
Got it working - after reading through numerous topics on this forum.

Correct format for addressing program scope tags on a ControlLogix system is: PROGRAM:ProgramName.TagName
(The information is not mine - I copied it from someone else's post asking a similar question)

Can I ask for some advice on display presentation of I/O values from a modular PLC and distributed I/O system?

For debugging I need to display raw I/O values -> at the moment I went for multiple panel meters. The downside is that they occupy lots of space and do not display hex values (as far as I am aware) e.g. 0xFF is displayed as -1.
So I moved over to a DataSubscriber & Label solution. The downside is that it is a pain to maintain and implement any code changes.

Is there an easier option available? -> I've got in excess of 10 digital I/O modules comprising 8-bits each and need to display the values (in hex)

Any feedback is welcome

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Links for downloadable tutorial videos
« Reply #5 on: October 11, 2016, 07:18:57 AM »
You can make a small modification to the BasicLabel to get it to display in hex.

1) In Solution Explorer, expand down the AdvancedHMIControls project
2) Expand down the \Controls folder
3) Right click BasicLabel.vb and select View Code
4) Go down to line 548, you will see this code:
Code: [Select]
Dim v As Double
5) Change the "Double" to "Integer"

6) Go back to the Design View of the Mainform and add a BasicLabel to the form
7) Set PLCAddressValue
8 ) Set NumericFormat to "X2"

Now when you run the application, your value should show in hex with at least 2 digits. You can now add as many BasicLabels as you want for displaying a hex value by only setting the NumericFormat property.

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #6 on: October 11, 2016, 09:34:21 AM »
Wow- tried your suggestion and it works. Thanks Archie.

It correctly displays the no of digits using 'NumericFormat' value. However leading 'f' chars are shown when the I/O value exceeds 0x7F e.g. 0x0C is shown as '0c' but 0xC0 is shown as 'ffffffc0' etc. I don't suppose there is anyway around this or the ability to force it to use uppercase chars?

The only drawback I can see is having to modify a stock version of AdvancedHMI to achieve this. I guess I'll have to append a modification note of some sort to the code.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #7 on: October 11, 2016, 03:17:55 PM »
You should check this link for info:

https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx#XFormatString

x or X determine lower/upper case.
« Last Edit: October 11, 2016, 07:02:38 PM by Godra »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Links for downloadable tutorial videos
« Reply #8 on: October 11, 2016, 11:52:12 PM »
The only drawback I can see is having to modify a stock version of AdvancedHMI to achieve this. I guess I'll have to append a modification note of some sort to the code.
A better solution is to copy the BasicLabel.vb file and rename to your choice to create a custom control. Then edit the class name in the file where you find "Public Class BasicLabel"

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #9 on: October 12, 2016, 07:32:13 AM »
x2 changed to X2 and it does what I want it to. I'll rename the file as suggested - it's a more preferable solution.

If I come across a method of limiting the number of display chars -> I'll post it here.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Links for downloadable tutorial videos
« Reply #10 on: October 12, 2016, 08:20:24 AM »
It correctly displays the no of digits using 'NumericFormat' value. However leading 'f' chars are shown when the I/O value exceeds 0x7F e.g. 0x0C is shown as '0c' but 0xC0 is shown as 'ffffffc0' etc.
This is because the way it is converted to an integer (32 bit). For instance, assume the value is 0xFF. In signed decimal this converts to -1, which is how the driver returns the data. The BasicLabel modification first converts it to a 32 bit integer, then to hex. A 32 bit hex value of -1 is 0xFFFFFFFF.

If you want less characters, say only 4. Then change the code like this:

Dim v a System.Int16

The result of -1 will now become 0xFFFF

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #11 on: October 12, 2016, 10:05:43 AM »
I'll try that. See below for link to other data types. I assume the same information is still valid for Visual Studio 2015

https://support.microsoft.com/ro-ro/kb/311327

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #12 on: October 12, 2016, 10:06:15 AM »
My tests with BasicLabel and MOD RSSim show that 0xC0 or 192 is displayed as C0.

ffffffc0 represents -64.

Leading f's show for negative numbers.

Smcuser

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Links for downloadable tutorial videos
« Reply #13 on: October 13, 2016, 07:24:34 AM »
Tried the following

 Dim v As Short

and it restricts the number of display chars to 4 i.e 0xC0 = FFC0 instead of FFFFFFC0. Getting closer to what I want.....

As a further test I changed the type to UShort plus modifying the following .TryParse line to avoid an exception error but this it reverts back to showing negative decimal numbers i.e. 0xC0 = -64

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Links for downloadable tutorial videos
« Reply #14 on: October 13, 2016, 09:50:22 AM »
You are probably looking for this:

Dim v As SByte