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 - DBTechServ

Pages: [1]
1
A very big thank you.


2
Ok the display increments on each click but then reverts to original value of TC_Seal.PLCAddressValueSP

this is current code -
       Private Sub TC_Seal_Button4MouseDown(sender As System.Object, e As System.EventArgs) Handles TC_Seal.Button4MouseDown
        Dim Value As String
        Try
            'Value = ModbusRTUCom1.Read("40001", 1)(0)
            Value = TC_Seal.ValueSP
            Try
                'Value += 1
                Value = Value + 1
                'ModbusRTUCom1.Write("40001", Value)
                TC_Seal.ValueSP = Value
            Catch ex As Exception
                'MsgBox("Failed to write")
                MsgBox("Failed to write - " & Value & ". " & ex.Message)
            End Try
        Catch ex As Exception
            MsgBox("Failed to read - " & ex.Message)
        End Try
    End Sub


3
The error is a conversion issue -
msg - Conversion from string "HMI_SealTemp" to type 'Double' is not valid


4
with this modified code, I get the 'failed to write' error - (the original code is commented out)

    Private Sub TC_Seal_Button4MouseDown(sender As System.Object, e As System.EventArgs) Handles TC_Seal.Button4MouseDown
        Dim Value As String
        Try
            'Value = ModbusRTUCom1.Read("40001", 1)(0)
            Value = TC_Seal.PLCAddressValueSP
            Try
                'Value += 1
                Value = Value + 1
                'ModbusRTUCom1.Write("40001", Value)
                TC_Seal.PLCAddressValueSP = Value
            Catch ex As Exception
                MsgBox("Failed to write")
            End Try
        Catch ex As Exception
            MsgBox("Failed to read - " & ex.Message)
        End Try
    End Sub

I tried the " value +=1 " first with same result and then commented out to try current version

5
Thanks Archie. I'll give it a try.
I am assuming that I would use my CompactLogix tag reference instead of the ModbusRTUCom1.read as shown in your example.

FYI, your solution for the digital panel meter limits was perfect. Simple paste and run. THANK YOU :)
 

6
I am trying to use the up/down buttons on TempController.vb to raise/lower the property "PLCAddressValueSP" value without having to create plc tags and logic for increase and decrease which would then be associated with "PLCAddressClick3" and "PLCAddressClick4" properties. Is there an easy way to do this in the TempControl.vb code?
Maybe by using an inc/dec value set in the properties?


7
Support Questions / Re: Keypad min and max value "not a valid value" error
« on: September 18, 2014, 09:08:30 AM »
Thanks again Archie.
I have already created a work around -

    Private Sub DPM_FeederDropTime_Click(sender As System.Object, e As System.EventArgs) Handles DPM_FeederDropTime.Click
        ' FeederDropTime_Min and FeederDropTime_Max are seperate DPMs hidden behind the larger FeederDropTime DPM
        ' used to read the min and max values from the PLC
        DPM_FeederDropTime.KeypadMinValue = FeederDropTime_Min.Value
        DPM_FeederDropTime.KeypadMaxValue = FeederDropTime_Max.Value

    End Sub

but, I like your solution better and will implement immediately.

8
Support Questions / Re: Keypad min and max value "not a valid value" error
« on: September 17, 2014, 10:01:44 AM »
Thanks Archie.

Already looking into the panelmeter code.

By the way - GREAT Software package.  8)

9
Support Questions / Re: Keypad min and max value "not a valid value" error
« on: September 17, 2014, 09:36:52 AM »
Also, the error I mentioned is occurring if I try to use the plc tagname in the keypad min/max values section of the meter's properties page. I can only enter actual numbers there.

10
Support Questions / Re: Keypad min and max value "not a valid value" error
« on: September 17, 2014, 09:33:56 AM »
Thanks Archie but, the problem I have is when trying to use the min/max value tags read from the compactlogix plc.

I can limit the entry values via the properties of the meter and by using your example.

Am I pointing to the plc tag correctly?

        Dim dblMin As Double = CDbl(TO_HMI_Drop_Time_Min)
        Dim dblMax As Double = CDbl(TO_HMI_Drop_Time_Max)


11
Support Questions / Keypad min and max value "not a valid value" error
« on: September 16, 2014, 04:35:55 PM »
Hi all, hope someone can help point me in the right direction -

Using DigitalPanelMeterA to read and write value to CompactLogix tag. Everything works great until I try to use the keypad min and max entry limit tags from the plc. I can't even enter the tag without getting error :"....  not a valid value for Double".
I have tried referencing it from the code

  Private Sub DigitalPanelMeterA1_Click(sender As System.Object, e As System.EventArgs) Handles DigitalPanelMeterA1.Click
        Dim TO_HMI_Drop_Time_Max As Int16
        Dim TO_HMI_Drop_Time_Min As Int16

        Dim dblMin As Double = CDbl(TO_HMI_Drop_Time_Min)
        Dim dblMax As Double = CDbl(TO_HMI_Drop_Time_Max)
       
        DigitalPanelMeterA1.KeypadMinValue = dblMin
        DigitalPanelMeterA1.KeypadMaxValue = dblMax
    End Sub

12
Application Showcase / Re: Concrete Machine
« on: September 16, 2014, 11:14:37 AM »
Steve - GREAT video of system. Seems to be well thought out and I like the added touch of making the drawings directly available to the operator.
Thanks for posting it.
David

Pages: [1]