Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rbelknap

Pages: 1 2 [3] 4 5
31
Support Questions / Re: code help
« on: January 18, 2016, 09:23:21 AM »
I've never seen a select case done like that.

I think it should be like this:

Code: [Select]

    Private Sub DataSubscriber21_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber21.DataChanged
       
 Select Case e.PlcAddress
            Case "400001"
                Integer1.Text = e.Values(0)
                Hex1.Text = Conversion.Hex(e.Values(0))
            Case "400002"
                Integer2.Text = e.Values(0)
                Hex2.Text = Conversion.Hex(e.Values(0))
            Case "400003"
                Integer3.Text = e.Values(0)
                Hex3.Text = Conversion.Hex(e.Values(0))
            Case "400004"
                Integer4.Text = e.Values(0)
                Hex4.Text = Conversion.Hex(e.Values(0))
        End Select

Also, if you put in a break-point(F9) then you can see what addresses are coming through and step-through the code.

32
Support Questions / Re: modbus values?
« on: January 08, 2016, 12:01:50 PM »
This will basically do what the hex command does, but can't return any letters

Code: [Select]
MyBase.value = Val(Math.Truncate(e.Values(0) / 16) & (e.Values(0) Mod 16))

Again, this is assuming we are putting it in the correct spot.
To check, set mybase.value=1 or some other constant.
This should show if we can affect the value displayed.

33
Support Questions / Re: modbus values?
« on: January 08, 2016, 09:10:26 AM »
unfortunately I don't have a PLC to try it out with.

Perhaps Archie can help.

drksam, Post the subroutine where your trying to change the value. 

34
Support Questions / Re: modbus values?
« on: January 08, 2016, 08:08:04 AM »
You put this code there?
Code: [Select]
   
        Try
            MyBase.Value = Hex(e.Values(0))
        Catch ex As Exception
            DisplayError("INVALID VALUE RETURNED!" & e.Values(0))
        End Try

oh, and you're sure that you're using the new control?
You would need to compile the controls before putting the new one on the form.


35
Support Questions / Re: Click PLC Floating point addressing problem
« on: January 08, 2016, 07:46:16 AM »
I assume you're using the Modbus driver.

Try Putting and "F" in front of the address.

See this thread by Archie for explanation:
http://advancedhmi.com/forum/index.php?topic=765.0

36
Support Questions / Re: modbus values?
« on: January 08, 2016, 07:40:04 AM »
Actually, I had seen this post: http://advancedhmi.com/forum/index.php?topic=413.msg1671#msg1671

The values that you want are Hex, The values that you're getting are decimal.
Read through the last page of that thread and it should make sense.

37
Support Questions / Re: modbus values?
« on: January 07, 2016, 03:50:11 PM »
I'm pretty sure I was reading the same post you were in looking for the answer.

I see 2 options, Archie may provide more.

Option 1

Add the hex conversion code between Line 197 and Line 198 in the DigitalPanelMeter.
could also add a property to set if you want hex or not.

Code: [Select]
 
Private Sub PolledDataReturned(ByVal sender As Object, ByVal e As SubscriptionHandlerEventArgs)
     'Put the hex Code here.
End Sub

Option 2

Create a new control that would be for hex by doing this:
Create a new class in the purchased folder.
Copy all of the code form the DigitalPanelMeter control
Paste it into the new Class, Paste over everything in the new class
Rename At the top where is shows "Public Class DigitalPanelMeter" to Public Class DigitalPanelMeterHex
Then paste the Hex code as above
Once you re-compile, it You will have the DigitalPanelMeterHex in your toolbox

The line numbers I show assume you're using 399a.

Good Luck,

Rich



38
Support Questions / Re: Making Pilot Light color brighter
« on: December 11, 2015, 02:37:19 PM »
Aviraj,

I finally found some time to play with this.

Put the attached in your purchased folder, Build and try it out.
It'll be PilotLightBright in the Toolbox

Rich

39
Support Questions / Re: Test available ports - EthernetIPforCLX
« on: December 11, 2015, 08:56:02 AM »
I'm not sure if this will work or not.  Just using a bit of imagination and hopefully you can follow my thought process.

I'm thinking that this is a Multi-Step step process.

Step 1, hook up to the PLC on a default port and get "assigned" a new port number.
Step 2 Disconnect from the default port
Step 3 Re-Connect using the assigned port from Step 1.

You could do this each time the app starts.
The only comms on the default ports would be to get a new port assigned.

Make sense?

40
Normally you get this error when something you are trying to use has not been initialized with the new keyword.

Try putting a breakpoint on the line(F9) and when it breaks you can use the mouse to hover over the different parts of the statement to see if one of the variables comes back as not having been initialized.
This should give you a direction to go in.

If hovering doesn't work you can highlight the variable names and hit Shift-F9 to get the values.

41
Support Questions / Re: Making Pilot Light color brighter
« on: December 09, 2015, 08:35:26 AM »
Unfortunately I'm not in a spot right now where I can try to figure this out.
Perhaps Archie has something he can share to do this, I know I couldn't have added the text stuff without him.

The only way I can even conceive to do this would be to draw a circle over the existing light and making properties to make it a different color.

Good Luck with this.  I'll jump back in if there is something I can help with, but as I said, I don't have the time to devote to the entire thing right now.

42
Open Discussion / Re: Adding and Removing PLC Addresses in ChartBySampling
« on: December 07, 2015, 01:37:45 PM »
A quick look shows that there are several ways to remove form the collection.
I haven't run anything to verify, but it looks like you can remove by specifying the PLCAddressItem name, ie PlcAddressItem1 or by specifying an index in the collection.

Code: [Select]
        Me.ChartBySampling1.PLCAddressItems.Remove(PlcAddressItem1) 
'or
        Me.ChartBySampling1.PLCAddressItems.RemoveAt(index As integer)

That code could get interesting if you're looping through the items list as it'll be getting smaller when you remove items.

You may be better off only adding good values instead of trying to remove bad ones, if that makes sense.

Good luck.

43
Support Questions / Re: Making Pilot Light color brighter
« on: December 07, 2015, 01:08:39 PM »
I had a similar issue but Archie helped me to add some On/Off test to the pilot light.
Not sure if it'll work for you or not.

See this thread:  http://advancedhmi.com/forum/index.php?topic=1007.0

Download the vb file in the last reply and put it in your purchased folder, then compile to try it out.

44
Open Discussion / Re: Adding and Removing PLC Addresses in ChartBySampling
« on: December 07, 2015, 01:02:49 PM »
I'm not sure how to do the looping, but kind of figured out the add by just creating a chart and adding to the collection.
Below is code form the form.designer.vb

Code: [Select]
'Declare the addressItem
        Dim PlcAddressItem1 As AdvancedHMIDrivers.PLCAddressItem = New AdvancedHMIDrivers.PLCAddressItem()

'Fill in the properties
        PlcAddressItem1.LastValue = Nothing
        PlcAddressItem1.NumberOfElements = 1
        PlcAddressItem1.PLCAddress = "L0410"
        PlcAddressItem1.ScaleFactor = 1.0R
        PlcAddressItem1.ScaleOffset = 0.0R
        PlcAddressItem1.SubscriptionID = 0

'Add it to the collection
        Me.ChartBySampling1.PLCAddressItems.Add(PlcAddressItem1)


I was able to get to the form.designer.vb by searching for PLCAddressItems, can't figure out how to get there otherwise.

45
Just an outside guess here, but it sounds like the advanced HMI components weren't compiled in Release mode.

Make sure the entire Solution is in Release mode and then right-click on the solution and Build.

Pages: 1 2 [3] 4 5