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.


Topics - MrPike

Pages: [1] 2 3 ... 7
1
Support Questions / Modbus read to Double
« on: October 29, 2023, 01:02:53 PM »
Hey Archie, I have been away from AHMI for awhile but now I'm taking on another project and need to relearn some things.  I want to set the maximum value of a guage compact on a button click with a modbus register value but can't get the string from the modbus read to parse to the double of the meter.  i tried Double. tryparse method but this does not accept String() types.  Any help is appreciated, thanks

 

2
Feature Request / TextbyBit control
« on: June 25, 2021, 10:00:04 PM »
It would be nice to be able to display different text of a label based on a bit status.  ie BitOn= "Active"....BitOff= "Inactive"

3
Open Discussion / tool to convert data types
« on: June 12, 2021, 10:15:32 AM »
Is anyone aware of a tool or application that can be used to convert between data types such as INT,DINT,REAL etc. outside of doing it in a PLC program?  I would like to have a handy stand-alone "calculator" to reference when programming.  I'm not sure if Excel can do this??  If not, I may attempt to create one.  Thanks. 

4
Support Questions / keypad min max values
« on: June 03, 2021, 11:47:46 AM »
Hey AHMI, long time without a post but I am doing a new project and I am implementing an AnalogValueDisplay control.  The issue I'm having is the keypad Min/max values are applied to the password as well.  This limits me to the passcode I can enter.  For example, my acceptable values for the control are min=1 and max=6 but I want my passcode to be 1111 which is obviously above 6 and not allowed.  Am I missing a property setting or is this a "bug"?  Thanks.       

5
Support Questions / Basic label numeric format
« on: October 29, 2020, 01:28:34 PM »
Would I be correct in assuming the numeric format property affects the display of the value by adding or truncating decimal places?  For example numeric format 0.0 would show a float value to one decimal place such as 9.7773 as 9.7and if I wanted two decimal places I would use 0.00 to get 9.77?.  My configuration below has 0.0 as the format but I am getting more than one decimal place.  Thanks. 

6
Support Questions / multiple PLC addresses for MessageListByBit
« on: October 23, 2020, 10:51:32 PM »
I'm trying to use the MessageListByBit component and it has a property "PLCAddressValues".  I assume the plural values means I can assign more than one address to the component.  If so, how do I enter them in the property box?  Thank you. 

7
Support Questions / Write data between PLCs
« on: October 22, 2020, 08:43:42 AM »
I am attempting to use AHMI to read ModbusTCP data using a datasubscriber then write whatever data is returned to another controller.  I'm having trouble with the code, please see attached.  How would I do this?  Thanks

8
Support Questions / VS2019 error when opening project
« on: October 21, 2020, 10:57:25 PM »
Hi AHMI, I am using VS2019 Community and started a fresh project recently.  I added two ModbusTCP drivers to the main form and named one "dvrMasterPLC".  I keep getting the attached error when I open the project.  When I go to the code it looks ok to me and I can simply comment the line out then uncomment it with no other changes and the error goes away.  Any idea what is causing this error?  Thank you

9
Open Discussion / change which form opens first in VS2019
« on: October 04, 2020, 10:13:36 AM »
Hey AHMI community, I have a general VS2019 question, how do I open a different Winform other than Form1 initially?  I have added a second form and want it to open first when the app is started.
 I have looked for a setting in the project properties but can't seem to find the setting.  Any help is appreciated, Thank you.   

10
Open Discussion / Modbus server
« on: April 02, 2019, 02:17:01 PM »
Hi all, I know AHMI is a client only but I was wondering if anyone has found a Modbus library out there that allows for creating your own modbus server application.  I have played with EasyModbus but ran into some walls and the support seems to have fallen off.  I appreciate any info in the right direction, thanks.   

11
Support Questions / Expose register that triggers datachanged event
« on: March 21, 2019, 10:35:19 PM »
Hi guys. I am working with a device over Modbus TCP and I am creating my own register map since I don’t have access to one. I am thinking I can use a DS2 and set the element range to about 100 and populate a textbox with the register that triggers the datachanged event. I dont care about the value in the register just the register number itself.  How would I go about writing this code? I guess I could set a breakpoint but i was hoping to avoid this to make multiple executions quicker. Thanks.

12
Open Discussion / Looking for creative ideas
« on: January 09, 2019, 08:12:09 PM »
Im looking to tap the creative AHMI minds here. I have a 24in Armstrong touchscreen that is leftover from a job. I want to know what creative thing You would do with it. Some things I thought of was join it with a RPI and stream TV with Kodi or maybe embed it into a smart mirror. Let the ideas flow😄

13
Open Discussion / Industrial Raspberry Pi Core 3
« on: January 09, 2019, 08:36:51 AM »
I am not a RPI user but this looks interesting.  I'm not sure how it fits into use with AHMI but if nothing else it supports Modbus TCP.  A little pricey IMHO compared to an actual PLC from Automation direct.  Brush up on your German if you want to view the tutorials :)

https://revolution.kunbus.com/revpi-core/ 

14
Support Questions / Call KeyDown event from button
« on: October 11, 2018, 10:39:29 AM »
I have a basic vb question that I cannot get right.  I want to call the KeyDown event of a textbox with a button click.  This code throws an "Invalid Cast exception was unhandled" when I press the button.  I assume I do not have the correct arguments but not sure what to use.  Any help is appreciated, Thanks.

Code: [Select]
Private Sub btnConnect_Click(sender As Object, e As EventArgs) Handles btnConnect.Click   'give the user the option to click a "connect" button
        tbxIPaddress_KeyDown(sender, New System.EventArgs())

    End Sub

15
Support Questions / User Control Flickering
« on: September 30, 2018, 12:17:10 PM »
Archie, I wanted to create a custom control for a gauge.  I created a new user control and set the background image of it to the gauge i want then I draw the line of the gauge using the following code.  Everything works great except the control 'flickers' when it is updated too fast.  I set the Double Buffer to true and enabled AntiAliasing, however this does not seem to help. What can I do to prevent this flickering?  Thank you 

P.S. How do you post code in this forum?

 protected override void OnPaint(PaintEventArgs e)
{
    this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
    //call the base paint method
    base.OnPaint(e);
    // enable anti Aliasing
    e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
   
       
    // draw the objects
    Pen pointer = new Pen(this.BackColor, needleWidth);// create an initial pointer for the gauge using the controls back color
    // draw the pointer on the gauge
    e.Graphics.TranslateTransform(Width * 0.5f, Height * 0.5f);  // sets the center of the control as the point to rotate the needle around
    e.Graphics.RotateTransform(180+n_value);  //the value to rotate the needle based on a public "Value" property.  Had to offset by 180 degrees
    e.Graphics.DrawLine(pointer, 0, 0, 0, Height * 0.5f);  // this sets the length of the needle to just under half the height
    pointer.Dispose();  // release the resources

Pages: [1] 2 3 ... 7