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

Pages: 1 2 [3] 4 5
31
Open Discussion / writing to excel
« on: October 25, 2015, 10:32:40 PM »
Mr. Pike.

Most likely Excel is cutting off the seconds because of its formatting.

Select the column and right-click and select format.

Now in the box add ":ss" and then see if this is OK.


32
Tips & Tricks / Modbus Addressing
« on: September 17, 2015, 12:36:09 AM »
Godra,

Great work. Thanks for sharing.
I will definitely check it out, but it may take me a bit because of other involvements.

Thanks again,

Doug Lyons

33
Tips & Tricks / Modbus Addressing
« on: September 13, 2015, 09:49:23 PM »
Godra,

Yes, I did contribute back to the Mod_RSsim program with some improvements and fixes to create ModRSsim2.
My contributions were only a very small part added onto the original great program which had the last version as Revision 8.20
I liked the features of this program very much, the but I found several small errors in the code.
The original developer seems to have moved on to other work areas and was not responding to BUG reports or emails.
Therefore I took it upon myself to try and fix the errors that I found and add features such as logging to disk.
The result was what is now on SourceForge as ModRSsim2 and I plan to make changes to it to make this program DPI aware.
This was the result of seeing that your program did not display correctly on my 125% magnified desktop.
My older eyes need a bit of help here and there is even another option to use 150% that should be accounted for.
I have been researching what is required to do this and I believe that I have the basis to proceed.
When I am finished I plan to make proposed suggestions to your program to account for these conditions as well.

Thanks for noticing.

Doug Lyons

34
Tips & Tricks / Modbus Addressing-Slave Simulator
« on: September 08, 2015, 12:02:22 AM »
Godra,

I made very few changes to get it to display properly on my Windows 7 machine.
Here are the actual lines that I changed in the Form1_Load Subroutine:

Line 186:
Code: [Select]
        Me.MaximumSize = New Size(800, 850)
Lines 266 & 267:
Code: [Select]
        Me.formEditValue.Size = New Size(200, 75)
        Me.formEditValue.MaximumSize = New Size(200, 80)

Line 276:
Code: [Select]
        Me.formButtonOK.Size = New Size(52, 25)

It should be possible to check the Windows version and if 7 or greater then make the above changes.
If I get a chance I will try and look into this and post the revised code.

One other change I made was to the four DataGridView controls. I changed the Address column (1) to a Width of 125 on each one.
I used a right-click with "Sent to Back" to cycle through the controls, but there may have been a better way.
Otherwise the complete address range was not shown for me.
Also, I think that the column widths for the Input Registers and Holding Registers could be a bit wider as well but I did not change these.

Thanks for your help with this.

Doug Lyons

35
Tips & Tricks / Modbus Addressing
« on: September 05, 2015, 09:06:03 PM »
Godra,

The new 64-bit version now shows all of the main window. The Set Cell popup is still very small like before.
I did not realize that your dropbox links included the solution files for this application until you mentioned it above.
Now I have downloaded them and I will open and experiment with them shortly.

Thanks very much for your suggestions and speedy reply. I always enjoy finding a new Modbus tool.

Doug Lyons

36
Additional Components / Сhart
« on: September 05, 2015, 05:02:49 PM »
Should this be moved to "Additional Components"?
It seems like a good candidate for that category.

Thanks.

37
Tips & Tricks / Modbus Addressing
« on: September 05, 2015, 04:49:51 PM »
Godra,

On my Windows 7 64-bit laptop the program will not fully display.
See the attached picture for what I get. Also, I am not able to stretch the form to be able to see any more.

I am running the desktop with Medium Text if this might make a difference.
Also double-clicking brings us a Set Cell that and the value cannot be seen.

Doug Lyons

38
Support Questions / Need Modbus RTU slave driver
« on: June 20, 2015, 12:17:26 AM »
My previous post was based on using Modbus TCP and I just noticed that this request was for an RTU slave driver.
To do this with the ModRSsim2 program you would have to use its Modbus RS-232 functionality.
The you could use com0com and hub4com from https://sourceforge.net/projects/com0com/.
Hub4com would be set up to have three virtual ports and the Windows hardware port is assumed to be COM1 here.

Now you would have to route from the COM1 port into the shared ModRSsim2 port(allows COM1 requests to get to ModRSsim2).
Next route from the AdvancedHMI to the ModRSsim2 port(allows AHMI requests to get to ModRSsim2).
Finally route from the ModRSsim2 port to both the AdvancedHMI and COM1 port(allows responses from ModRSsim2 to go to COM1 and AHMI).

I am not sure how "hub4com" will handle requests if they come rapidly because the message may get intermixed.
Probably a better option would be to use an Modbus RTU to/from Modbus TCP gateway.
There is one here https://sourceforge.net/projects/mbus/ but it is for Linux but might be portable to Windows.

I have not tested any of these suggestions but maybe they will give someone the idea of how this might be done.

Doug Lyons

39
Support Questions / Need Modbus RTU slave driver
« on: June 19, 2015, 09:44:22 PM »
You should be able to do this easily by just adding a Modbus Slave to your AHMI computer.
Here is one that I helped revise and it works well https://sourceforge.net/projects/modrssim2/.

Now when you set up AdvancedHMI use the normal Modbus with an IP address of the loopback (127.0.0.1).
When AdvancedHMI reads from the local Slave the values shown will be whatever has been placed there.
Now on the remote Masters write to the IP address of the AdvancedHMI computer.
Now the values you send will be stored in the Slave which will then be read by the AdvancedHMI master.

I have tested this and it worked for me. Good Luck!

Doug Lyons

40
Support Questions / DF1COM Problems
« on: March 17, 2015, 07:38:37 AM »
For the FTDI CHIPI-X I just plugged in the device and my Windows 7 64-bit went to the Windows Update site and automatically downloaded two drivers. I am out of town and do not have this device with me but I will try and tell you what it is using when I get back.

I am sorry that you did not have the good luck that I did with your device. Also, I was using Advanced HMI Version 3.70 at the time of my tests I believe.


41
Support Questions / DF1COM Problems
« on: March 17, 2015, 01:03:49 AM »
I had two different Serial-to-USB adapters that caused me problems.
One was a Dynex brand that came from Best Buy and the other was a Cables-To-Go brand.
These both had problems and they also both had Prolific chip sets in them.
There is a checkchipversion tool from here http://prolificusa.com/pl-2303hx-drivers that will confirm these chip sets.

I eventually found three solutions to my problems that really worked.
 1) Purchased a Dell E-Legacy adapter that has a real COM1 port that is mapped to the same Port and Interrupt that most software understands.
 2) Purchased a Tripp-Lite Keyspan model USA-19HS from Tiger Direct
 3) Purchased a FTDI CHIPI-X USB-to-Serial adapter from Digi-Key

All of these items worked just fine with a SLC-5/05 using the DF1 serial protocol.

42
Support Questions / how to post code in a scroll bar window
« on: January 16, 2015, 09:08:24 PM »
scott.clark,

I have attached some screen captures that show you how to automatically insert the symbols that Archie showed.
The second shot shows what the input box looks like and the cursor is in between the bracketed symbols.
The input window will not show the scrollable bars, but you can "Preview" at the bottom right to see what it will look like when posted.

This was confusing to me for a while as well and even now I have to cursor over the symbols at the top and look for the tooltip to show the one I am looking for.
The final result is really nice though.

Doug Lyons

43
Sprungmonkey,

Please see http://advancedhmi.com/forum/index.php?topic=238.0
Look near the bottom of the first page for what worked for me.

It shows the following:

I saw that you noted that the value change testing is done in the PolledDataReturnedValue event handler.
I went to this routine and did some testing and found that changing one statement fixes this for me.
The statement "LastValue = m_Value" can be changed to "LastValue = e.Values(0)" and now I get no duplications.

Hopefully, this should help you with your problem.

Doug Lyons

44
Scott,

I wanted to share an idea that I have used extensively in the past to handle this.
The reason that I like to do it this way is that there are many variables that can affect communications.
Trying to use one of these internal items can sometimes be questionable at best.

The concept is to build a timer driven function and read a constantly changing variable in the PLC.
Normally I like to set up a variable of the PLC's internal clock and map it to a seconds variable.
An alternate is just to use a 60 second counter and reset when the count is 60.

Inside the subroutine you create variable to saving the last seconds and a count of the missed changes.
When it executes it checks to see if the stored value for seconds matches the current seconds.
If so that save the current seconds into the saved value, reset a comm loss flag and exit.
If not then increment a missed counter and check if the values exceeds your miss maximum to declare comm loss.
If the maximum has occurred then set your comm loss flag and exit.

Now you are not depending upon anything other than the basic functionality or reading a tag.
Here is an example:
Code: [Select]
Public CommsOK As Boolean   ' Needs to be a global variable

Private Function CommsChkOK(Seconds As Integer) As Boolean

Static TIMER As Integer      ' Last Seconds storage
Static BadCount As Integer
Dim MaxBad As Integer

MaxBad = 10                   'Set your maximum seconds until failure here

If (TIMER <> Seconds) Then
    BadCount = 0              'Zero failed communication count
    TIMER = Seconds        'Save last Seconds
Else
    BadCount = BadCount + 1   'Add one to Failed Communication count
End If


If (BadCount >= MaxBad) Then
    BadCount = MaxBad        'Keeps BadCount from overflowing
    CommsChkOK = False       'Alarm Failed Communications
Else
    CommsChkOK = True        'Clear Alarm
End If

End Function

Private Sub Timer1_Timer()    ' Timer enabled and set to 1 sec (1000)

Debug.Print Second(Now())
' Call CommsChkOK(PLCSeconds) here

' Debug.Print CommsChkOK(Second(Now())) 'Demonstrate good
Debug.Print CommsChkOK(21)              'Demonstrate bad

End Sub

Let me know if you have any questions.

Doug Lyons

45
Support Questions / V 396 error when adding purchased controls
« on: January 07, 2015, 06:16:31 AM »
Archie,

I think that I may have found the actual problem.
It appears that you must select the "AdvancedHMIControls" section of the Project.
The go to the Properties and References and check the Microsoft.VisualBasic there.
I have included screen captures of what seems to work with the least amount of effort.
These are shown as they were found and need to be checked to work correctly.
Surely enough when I checked in my Version 3.95 project this item was selected.
This single change seems to fix all that happened to me that was similar to Darrell's problems.

Doug Lyons

Pages: 1 2 [3] 4 5