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 - scott.clark

Pages: 1 2 [3] 4 5 ... 7
31
Is there a performance difference on placing all controls on the MainForm subgrouped on Tabs in a TabControl vs. placing the subgroups of controls on separate forms and using the FormChangeButton control?

32
Support Questions / Re: FormchangeButton Passcode property
« on: October 16, 2015, 06:43:04 PM »
Is there a way to put a variable in that location so that it could be changed by the end user without recompiling?

33
Visual Studio Express 2013,  AdvancedHMI v3.99a

If I create a BasicButton(BasicButton1) on a form, I can change the BackColor.   But then if I copy that button, creating a new instance(BasicButton2) , and then change the BackColor of the new  instance(BasicButton2), then the new  instance(BasicButton2) reverts back to the originally created (BasicButton1) BackColor after a build or test run.

 But then if I close the solution and visual studio, then start visual studio and the solution, the Backcolor for BasicButton2 returns to the last BackColor I set.

What could be going on?.  It slows down the programming process?.

34
Support Questions / FormchangeButton Passcode property
« on: October 16, 2015, 04:22:11 PM »
How do you use the passcode property for the FormChangeButton control?

35
I am starting a new application and and thinking about how to define my tags to keep the HMI responsive.   There will be many pushbuttons and discrete indicators with some integer and floating point value indicators.  I am supposing that rather than having a bunch of unique names for the tags, it would be better to group them into arrays.  Or am I overthinking this thing?

For instance, for the property PLCAddressHighLight, we might use a Tag: HMI_ButtonHighlight[0].0
so for 64 buttons, all the highlights could be handled by a 4 dint tag array, HMI_ButtonHighlight[0] ..  HMI_ButtonHighlight[3]
These are tags that are read are the polling rate, correct?

So in the case of tags that are written, is it relevant?  When Advanced HMI writes to a bit of a dint in the PLC, is it addressing the dint bit directly, or writing the whole Dint?

thanks for the great support!

36
Support Questions / Re: ModbusRTU Send Que Full
« on: March 10, 2015, 10:40:56 AM »
I am getting the following exception when executing the ModbusCom Read:

"Unknown error code -1"

What does it mean?

37
Support Questions / Re: ModbusRTU Send Que Full
« on: March 06, 2015, 06:01:28 PM »
The subroutine is in it's own thread and is only executed in this thread.
The subroutine, once started has a Do While Loop that runs until the public variable ("g_ModbusRTURequestConnection" becomes false, at which time the Loop exits and disposes the ModbusRTUCom instance.
The subroutine is called once every couple of minutes and runs for about 20 seconds before exiting.
The loop in the subroutine polls using the read instruction at 100ms per interval.

How long is the timeout?

The two exceptions I have observed are:
"No Reponse from PLC. Ensure driver settings are correct."
"Unknown error code -1"
 
I assume the first one is the result of the timeout.....does the second one make any sense?

Additonal info:
In the same thread that calls this ModbusRTU_Control() , there is another subroutine that uses the same COM port for a DLL that does a firmware update to the modbus device. It is called similarly and is disposed  prior to calling the ModbusRTU_Control() subroutine.  I found that I had at add a 500mSec wait time before calling the  ModbusRTU_Control() sub to insure the COM port was available.


Thanks!

38
Support Questions / Re: ModbusRTU Send Que Full
« on: March 06, 2015, 07:16:16 AM »
I am using version 3.97d

I am starting the application without a ModbusRTUCom Driver.  In this application, I am testing a modbus devices.  When I need communcations with the modbus device, the above code is executed, when finished with testing,  the procedure exits and disposes the ModbusRTUComMainForm instance of ModbusRTUCom(This is the only Instance of ModbusRTUCom that is executed in this application).   Each time we execute the ModbusRTU_Control() procedure, it is likely there will be some packets that don't get replies. 

Does disposing the ModbusRTUComMainForm instance of ModbusRTUCom flush out the SendQue?  If not, what would?

Thanks!

39
Support Questions / ModbusRTU Send Que Full
« on: March 05, 2015, 11:05:11 AM »
I have a Modbus device that gets powered off and back on, so when I want to communicate, I poll with a read instruction and have been using the exception "No Reponse from PLC. Ensure driver settings are correct." as an indication that  the modbus device is not powered on. 

I am guessing "Send Que Full" exception is a result of taking too long for the Modbus device to power up.  How can I Poll the modbus device while waiting for it to power up without filling up the send Que?

Thanks for the help!


Code: [Select]
Private Sub ModbusRTU_Control()
        Dim n_strMessage As String
        Dim n_strValueRead As String = Nothing
        Dim n_strValue5(4) As String
       
        Dim ModbusRTUComMainForm As New ModbusRTUCom
        ModbusRTUComMainForm.PortName = g_INIFIleSettings.ModbusRTUPortName
        ModbusRTUComMainForm.BaudRate = g_INIFIleSettings.ModbusRTUBaudRate

        Try
            Do While (g_ModbusRTURequestConnection)
                '******************************************
                '* Attempt to read values to validate ModbusRTU Connection
                '* Success indicates That ModbusRTU connection is established
                '* We read these particular registers because we need them anyway
                '******************************************

                Try
                    n_strValue5 = ModbusRTUComMainForm.Read("44120", 5)
                    g_ModbusRTU_Connnected = True

                Catch ex As Exception
                    g_ModbusRTU_Connnected = False
                    If ex.Message = "No Reponse from PLC. Ensure driver settings are correct." Then
                        n_strMessage = "Procedure MainForm:ModbusRTU_Control() failed with error" & vbCrLf & "XCM25D is not connnected or not powered"
                        ShowMessageBox(n_strMessage)

                    ElseIf ex.Message = "Unknown error code -1" Then
                        'I believe this error code is a result of DLL232_SerialCom not disposing quick enough before ModbusRTUComMainForm is used
                        g_ModbusRTURequestConnection = false

                    Else
                n_strMessage = ex.Message & "While Testing Connection"
                        ShowMessageBox(n_strMessage)
                    End If
                End Try

                Thread.Sleep(100)
               
          Loop

           
        Catch ex As Exception
            n_strMessage = ex.Message & " in Procedure ModbusRTU_Control()"
            ShowMessageBox(n_strMessage)
        End Try

        ModbusRTUComMainForm.Dispose()
    End Sub


40
Using AdvancedHMI v3.97d with Visual Studio 2013

In my application, I created an instance of a driver component ModbusRTUCom on the Form[design].  I don't have any objects on my design form that poll or use the ModbusRTUCom.

In my form.vb, I  use  ModbusRTUCom.read and ModbusRTUCom.Write commands, which works fine. 

Then I have another ModbusDLL that I need to execute some commands from that needs to use the same serial port.

So I execute,

ModbusRTUCom.Dispose(), which allows me to exectute the ModbusDLL procedures.   Once completed I execute the ModbusDLL.Dispose()

But then when I try to  ModbusRTUCom.read , I get the exception" Cannot access a disposed object."

What do I need to do to work around this?

41
Works great, thanks!

42
I would like to read a .ini file on startup and set the IP address of the EthernetIPforCLXCom driver.  How would I go about doing this?

Thanks!

43
I have noticed that as I am debugging and stop at a break point, when I resume, EthernetIPforCLXCom communications don't resume.  So as I am debugging, I have to do a complete restart after pausing.  I don't remember having to do this with previous versions.

Should it be resuming EthernetIPforCLXCom comms?

Thanks,
Scott

44
Support Questions / Re: Who has run applications long term?
« on: January 27, 2015, 04:00:34 PM »
I have an AdvancedHMI application that I installed January of 2014.  Other than some minor updates I have made to add some display pushbuttons, it has been running 24/7 on a 32bit WinXP oem box.  No reports of any exceptions or crashes.  If I remember, it was v3.62
 :)

I have a new application in the works now with v3.97d

I am still making lots of changes everyday,  but I leave it running all night with no issues so far.

45
Support Questions / Solution Tree structure - MainForm
« on: January 27, 2015, 10:14:39 AM »
This is something odd that I have seen in my solution and I don't know why it happens, what if means if anything.  Maybe someone can shed some light on it.

When I open up my solution and expand the solution tree for MainForm, it lists

Mainform.vb
     >MainForm.Designer.vb
                  >MainForm.vb
       MainForm.resx
     >MainForm.vb

After after opening Mainform.vb[Design] and performing a rebuild the tree changes to:

Mainform.vb
     >MainForm.Designer.vb
           >MainForm.vb
      MainForm.resx

The "MainForm.vb" dissappears from the tree.

If I then close Mainform.vb[Design] then the tree changes to:

Mainform.vb
     >MainForm.Designer.vb
           >MainForm.vb
      MainForm.resx
     >MainForm.vb


The question is, Why does the "MainForm.vb" dissappear from the Solution Tree?  Where did it go?


Pages: 1 2 [3] 4 5 ... 7