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

Pages: 1 ... 4 5 [6] 7
76
Open Discussion / “AdvancedHMIModbusToExcel” example
« on: February 19, 2018, 11:38:19 AM »
I just downloaded the “AdvancedHMIModbusToExcel” and ran the app and got a good read from the PLC and when I click the “write to spreadsheet” button it says that it was successfully written to Excel File” But no entries in the file?????????

77
Open Discussion / Re: What would you like to see in the next major release?
« on: February 13, 2018, 06:33:26 AM »
Larry,

If you would care to experiment again, there is a ModbusTCP driver you could try for a test:

http://advancedhmi.com/forum/index.php?topic=1975.0

Try to read all the posts to see what features it has and try using the modified BasicLabel with it.

Godra,
I have been using the ModbusTCP driver for the AutomationDirect P2-550's and I still can't find the way to read a string with the BasicLabel.  I'll keep trying to test when I get time.  This code from Archie works very well for the serial number strings., and the AnalogValue Display works fine.  This will read any length string I have.
         "Dim str(7) As String
        '* Read it from the PLC
        str = Modbus51.Read("40002", str.Length)
        Dim ResultString As String
        ResultString = MfgControl.AdvancedHMI.Drivers.Common.CalculationsAndConversions.WordsToString(str)
        AnalogValueDisplay34.Text = ResultString" .
I have P2-550's at work and at home so if you need to test some thing let me know. I am learning a lot from all here on the forum.

Thanks for all your  time.  Larry

78
Open Discussion / Re: Data Base Decision
« on: February 01, 2018, 11:29:16 AM »

jazzplayermark

This one is an AutomationDirect P2-550. I am using the modbusTCP driver, and its working very fast and well. Thanks for the point of a direct call to the driver.  " Modbus51.Write("00001", True)" works very well for the bits.

Thanks again.   Larry

79
Open Discussion / Data Base Decision
« on: February 01, 2018, 08:22:47 AM »
Good Morning,  I have a question about writing a value back to the PLC from code, I have a Data Base returning an Integer back to the VB and need to pass that on to the PLC.  What would be the best way to use the code to write it to the PLC?

Larry

80
I will ask you to go back to what works for you.

Since Modbus drivers need fixing for the Subscribe function, let's wait for Archie to make those changes (and hopefully introduce Modbus string reading as well).

Just FYI, you can always click the "Continue" button when the app stops at the break point. If it needs to process that same break point line then it will stop at it again otherwise it will continue running the app.

You would normally use break points to make sure that the code is being processed, look at the current values of variables in the lines above the active break point as well as to step through the code by pressing F11 button, which would then show you the flow of processing one line at the time and throughout all classes involved.

Godra, Thanks for the tips (I need them) and thanks for all the time on this. I have about 15 different machines to get data from at the start of their cycle and validate the right BOM  and then collect the production data at the end. The build group is on number 5 and I am on number 3. I am so glad to find the AdvancedHMI product.  We were planing on using "Mango" for the data collection. We ran into a trouble with the MS updates taking down Mango every time. This will allow me to put much nicer and more working data on each workstation PC. Plus combine DB and PLC data on the PC.

Thanks For all your work and time......
Larry

81
Yes it stops at the breakpoint.....

Larry

82
In the first label, try the 40001 address.

Godra,   When it ran I got a " System.OverflowException: 'Arithmetic operation resulted in an overflow.' "  If I change it back to the real address it runs like before.

Larry

83
With a fresh AHMI project, you just need to follow these instructions:

1) Remember to replace the BasicLabel control and SubscriptionHandler class (you do this by adding each new modified file as existing item to its corresponding folder). Rebuild your solution.
2) Place one BasicLabel on the form and just set PLCAddressValue to 40002.
3) Place another BasicLabel on the form and set its PLCAddressValue to 40002, set its InterpretValueAsModbusString to True and set its ModbusStringLength to 8.

Post what exact number you get in the first label and what you get in the second label.




 Basiclabel1 shows int value for string  Basiclabel2 shows blank   if I change the InterpretValueAsModbusString to false on label 2 and on in label 1 then label1 is blank and label 2 show the int value?????????

I have 4 of these processors now and can test anytime.  The string is a barcode scan compiled in the PLC and stored to 400002 - 400009 to be displayed on the panel view for the machine.  The other way works well.

Let me know if you want to try again.  Thanks Larry

Sorry I forgot the number "27243" and if I scan a different barcode I get a different number.

84
With a fresh AHMI project, you just need to follow these instructions:

1) Remember to replace the BasicLabel control and SubscriptionHandler class (you do this by adding each new modified file as existing item to its corresponding folder). Rebuild your solution.
2) Place one BasicLabel on the form and just set PLCAddressValue to 40002.
3) Place another BasicLabel on the form and set its PLCAddressValue to 40002, set its InterpretValueAsModbusString to True and set its ModbusStringLength to 8.

Post what exact number you get in the first label and what you get in the second label.



 Basiclabel1 shows int value for string  Basiclabel2 shows blank   if I change the InterpretValueAsModbusString to false on label 2 and on in label 1 then label1 is blank and label 2 show the int value?????????

I have 4 of these processors now and can test anytime.  The string is a barcode scan compiled in the PLC and stored to 400002 - 400009 to be displayed on the panel view for the machine.  The other way works well.

Let me know if you want to try again.  Thanks Larry

85
Larry,

The modified BasicLabel control was updated and replaced again.

Who knows, if you give it a try again then it might work this time (you can always resort to going back to whatever you are using currently).

Just trying it now . Still just gives the numerical value of the string. Where is the new one located so I make sure I have the latest copy?

Thanks Larry

86
The modified BasicLabel control in my previous post was updated and replaced.

Thanks to some Modbus related suggestions made by Archie, I think that this current version shows improvement and is working better.

Godra, I tried it this morning but it errors out at the build.

"SubscriptionHandler is not defined" 2
"SubscriptionHandlerEventArgs' is not defined "

I will try a clean project later and let you know.

Thanks Larry

87
Cool.

If you want to experiment, you might try squeezing your code like this:

Code: [Select]
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        '* Read it from the PLC
        AnalogValueDisplay34.Text = MfgControl.AdvancedHMI.Drivers.Common.CalculationsAndConversions.WordsToString(Modbus51.Read("40002", 8))
    End Sub

Thanks Godra,  I'll try it tomorrow and Thanks again for all the help. Larry

I haven't tried it but it looks logical.

88
My last suggestion to you is to be patient and wait for Archie to implement Modbus string reading into the driver.

Godra,  Again Thanks for your help and quick reply's. This is one of the best Forum's and product for any type of automation. I will post when I get it solved.

Thanks to all.

Godra,

P2-550 PLC from AutomationDirect, Scanner string in 4 register’s using an “AnalogValueDisplay” to show the string on the form. Using The ModbusTCPCom, and a timer for the read event. Starting the time on form load. Timer set to 200ms.

This is working great.

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Dim str(7) As String

        '* Read it from the PLC
        str = Modbus51.Read("40002", str.Length)

        Dim ResultString As String

        ResultString = MfgControl.AdvancedHMI.Drivers.Common.CalculationsAndConversions.WordsToString(str)

        AnalogValueDisplay34.Text = ResultString
    End Sub
This will work fine on the AutomationDirect Productivity2000 series controlers.  Thanks again for all the time and effort you put into helping with this. This is the best product around and the support is Great...      Larry

89
My last suggestion to you is to be patient and wait for Archie to implement Modbus string reading into the driver.

Godra,  Again Thanks for your help and quick reply's. This is one of the best Forum's and product for any type of automation. I will post when I get it solved.

Thanks to all.

90
Here is one more suggestion for tests with your PLC:

In Visual Studio, open the BasicLabel class and set a breakpoint as it is in the attached picture.
Then run the app and see if it stops at that line.

Godra,  I put the break in and ran it and no it did not stop at the break. ?????

Pages: 1 ... 4 5 [6] 7