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

Pages: [1] 2
1
It also occurs in 3.99y beta 38.  I am not sure how the drivers work, but this issue appears to be happening with all of the serial drivers.  The error is thrown before communication is attempted.

It only happens if the scale factor results in a decimal.

To replicate this all you need to do is put a DigitalPanelMeter on the main form of a fresh project, give it a Keypad scale factor of 2, keypad min 0 max 100, and send it to any of the SerialDF1 drivers with a PLCAddressKeypad of N17:1 for example.
Run the project, if you enter "4" into the keypad you'll get a "no response form PLC" error.  If you enter 5 you'll get a "input string was not in a correct format" error.

2
Thankfully rounding is just fine in my application.

I looked back at the DigitalPanelMeter code from the version 399k and it does use "m_ComComponent.Write(m_PLCAddressKeypad, CDbl(KeypadPopUp.Value) / m_KeypadScaleFactor)" so it probably is something to do with the driver.

Does my attached screen snip help at all?  I'm happy to play around with it if you'd like me to try different things.  The error is thrown before it attempts to write to the PLC so it should be easy to replicate.

3
It was throwing the exception at the write command right where you had me put the break point.  I don't think it liked the variable as a double.

4
Below is what I have changed those lines of code to and it seems to work.  Do you seen any issue with it?  I only know enough programming to get myself into trouble.
Code: [Select]
                    Try
                        If KeypadScaleFactor = 1 Or KeypadScaleFactor = 0 Then
                            m_ComComponent.Write(m_PLCAddressKeypad, KeypadPopUp.Value)
                        Else
                            Dim v As Double = CDbl(KeypadPopUp.Value)
                            Dim z As Double = v / m_KeypadScaleFactor
                            'm_ComComponent.Write(m_PLCAddressKeypad, CDbl(KeypadPopUp.Value) / m_KeypadScaleFactor)
                            Dim c As Integer = Convert.ToInt16(z)
                            m_ComComponent.Write(m_PLCAddressKeypad, c)
                        End If
                    Catch ex As Exception
                        System.Windows.Forms.MessageBox.Show("Failed to write value. " & ex.Message)
                    End Try

Thank you again Archie

5
Hello Archie,

My code is a bit different and it does not convert to a string.  I've attached some screen shots but below is the code in the version I have.
Code: [Select]
                    Try
                        If KeypadScaleFactor = 1 Or KeypadScaleFactor = 0 Then
                            m_ComComponent.Write(m_PLCAddressKeypad, KeypadPopUp.Value)
                        Else
                            Dim v As Double = CDbl(KeypadPopUp.Value)
                            Dim z As Double = v / m_KeypadScaleFactor
                            m_ComComponent.Write(m_PLCAddressKeypad, CDbl(KeypadPopUp.Value) / m_KeypadScaleFactor)
                        End If
                    Catch ex As Exception
                        System.Windows.Forms.MessageBox.Show("Failed to write value. " & ex.Message)
                    End Try

Thank you!


6
Hello,

I'm sure this is a simple fix that I'm overlooking.  I have upgraded my project from 399k to 399x.  I'm using visual studio 2017 and communicating with an AB SLC 5/03 using the SerialDF1forSLCMicroCom1 driver.  This project is for an oven controller.

Everything is working as far as I can tell except for inputting times.  I am using DigitalPanelMeter as the controls.  Temperature inputs using the Keypad work correctly.  Using the Keypad to input a time throws the error "Failed to write value. Input string was not in a correct format."

Time inputs have a KeypadScaleFactor involved that I believe is causing the error.  A KeypadScaleFactor of .01667 was used for version 399k (we input minutes into the HMI to send as seconds to the PLC).  I have also tried a scale factor of 60 (.01667 always seemed incorrect to me for the input, but it previously worked).

Could someone point me in the right direction?

7
Support Questions / Re: Object does not match target type
« on: July 27, 2016, 07:14:36 AM »
That seems to have fixed the problem.

Thank you!

8
Support Questions / Re: Object does not match target type
« on: July 21, 2016, 11:37:23 AM »
RSLinx auto-configures it to 19200.  I am not too familiar with serial connections though and do not know what the limiting factor is for baud rates are.

9
Support Questions / Re: Object does not match target type
« on: July 21, 2016, 10:35:59 AM »
Yes, everything works as expected in the HMI.  I have 3 ovens hooked up to the PLC and am able to control them as I want.  All other forms are reading correctly from the PLC.

The only reason I noticed that the CPU in my computer was being over-worked is because the pilot lights started to change color from the top to the bottom slowly enough to easily see.

10
Support Questions / Re: Object does not match target type
« on: July 21, 2016, 08:26:16 AM »
I just tested it and it still runs at 100% once you get 4 to 5 of the forms open. It jumps up in percentage significantly when each form is opened.

11
Support Questions / Re: Object does not match target type
« on: July 21, 2016, 07:42:17 AM »
When the Subscripts are disabled the program runs without using a lot of the processor and also won't connect to the PLC, but once I re-enable the subscripts it does the same thing again.

12
Support Questions / Re: Object does not match target type
« on: July 21, 2016, 07:09:14 AM »
I am using a Allen Bradley SLC 500. I have a SLC 5/03 processor, a 115 VAC input card, TRIAC output card and two thermocouple input cards.

Thank you for the assistance, I will let you know if it works.

13
Support Questions / Re: Object does not match target type
« on: July 20, 2016, 05:27:57 PM »
Didn't realize that was saved elsewhere on my computer.  I've attached them to this post.

I do not know how well visual studio handles references (I'm used to the difficulties of solidworks), but these files were located at C:\Rockwell\Ovens on my system if that is where visual studio is going to look for them.

On a side note I am not sure why it added the EthernetIPforCLXCom1 driver on your system.  The driver I am using is the SerialDF1forSLCMicroCom1.

Thank you.

14
Support Questions / Re: Object does not match target type
« on: July 20, 2016, 08:18:23 AM »
I changed the PollRateOverride to 2000 and it had only a small effect on the CPU usage.

15
Support Questions / Re: Object does not match target type
« on: July 19, 2016, 12:36:52 PM »
I have uploaded my entire project here: https://drive.google.com/open?id=0B3ksYA15iAfManFjcEtIQ0NveG8

For some background I am trying to use the SerialDF1forSLCMicroCom driver.  I have 8 Forms in all including the main form.  This is the first time I've used visual studio, so I've been trying to learn as I go.

When I did a Performance Profile on CPU usage the following function was shown to be utilizing near 100% of my CPU after opening all of the forms and going back to the main form.
MfgControl.AdvanceHMI.DriversAllenBradely.PCCC.PCCCforHMI.a

I believe it's either a polling issue or something to do with forms not actually closing when switching to a different form.

Your help is greatly appreciated.  Thank you!

Pages: [1] 2