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

Pages: [1] 2
1
Support Questions / Using .NET DataGridView ?
« on: May 11, 2017, 09:19:05 AM »
Greetings,

I want to use a DataGridView control in my application to write to PLC addresses.  The PLC is a SLC-5/05.  I did this for another machine that I wrote a .NET HMI for, but I was not using AHMI and the PLC was a Beckhoff CX2040.  I'd like to mimic what I did on that UI for at least this portion of this UI/HMI.  What is the least painful way to use a DGV to write to PLC addresses in the SLC?  Does AHMI have a ready-made built in control to easily do this?

Attached is a screenshot from the UI that I wrote for the CX2040 where I used a DataGridView control for.  I want to have it so that a user populates the DGV and then clicks a "Write To" button to write the values/entries to the appropriate PLC addresses in the PLC.  That's how the CX2040 UI works, so I would like to make this one like that too. 


2
Support Questions / Re: Deployment?
« on: June 09, 2016, 08:23:58 AM »
Archie,

For tools, I have NI Measurement Studio and I'm using a few of the tools from there - numeric edit control, button control, scope control.  The numeric edit controls and buttons I can do something else and just use either standard Windows controls for those, or the AdvancedHMI controls.  However, I really need the Scope control from Measurement Studio and I don't think I can supplement that with something else(?), and would really prefer not to. 

More details on what I want to do and the project:

I have NI hardware (Ethernet 4-slot  cDAQ chassis with 16 channel analog input module) in the machine that I want to integrate.  Currently, the machine controls are separated from the NI data acquisition portion.  So, for controlling the machine, we use a PV1000 touch panel talking to a SLC 505.  There is a PC with monitor next to the machine that the operator is required to use to start the data acquisition, which is a totally separate software program and not integrated or communicating with the PLC of the machine in any way.  I wrote VB code for this same NI hardware and integrated it on another machine, so now that other machine's HMI and data acquisition are contained all within one software program.  However, that machine uses a Beckhoff CX2040 embedded PC, so building a software application for that (using Visual Studio and some tools from NI Measurement Studio) and installing on the CX was not a problem.  Of course I had to write all the communication to/from the VS project to/from the PLC project but it wasn't that bad (after the headaches of figuring it out of course).

Now I'd like to do a similar thing on the machine in question, but as stated, this machine uses an older SLC 505 Allen Bradley PLC, hence I need AdvancedHMI for its communications to the SLC (unless there's an API out there for communicating from VS project to the SLC?).  My thoughts are to re-create the HMI in AdvancedHMI, then I'll take code that I wrote for the NI data acquisition for the Beckhoff machine, and "copy" it over for this project since the code is already written for that. Once the application is written and ready for deployment, I'll deploy it onto that PC that is next to the machine (currently used for data acquisition only), so then the machine controls and data acquisition are fully integrated into one software application, like I did for the Beckhoff controlled machine.  Lastly, I'll get rid of the PV1000 and add it to our surplus.

Attached are a couple snapshots from the UI on the Beckoff controlled machine that have that shows the Measurement Studio tools I'm using.

Don

3
Support Questions / Deployment?
« on: June 08, 2016, 07:24:40 AM »
I'm going to be using NI (National Instruments) Visual Studio tools in my project with AdvancedHMI, or at least that is my plan right now.  Using NI tools in the project, I am required to build an application using their builder tool and then install the software on the target machine.  Will AdvancedHMI still work by installing it on the target machine as a software application?  I ask this because from my understanding of AdvancedHMI, the "installation" process is simply grabbing the project folder and dropping it somewhere (desktop?) on the target machine?  That method won't work if I have NI tools in the project. 

4
Open Discussion / Re: Installaton
« on: June 07, 2016, 09:44:14 AM »
So v3.99 doesn't work with VS2012?  What version of AdvancedHMI should I use if I have VS2012 PRO?  I know I can download free version of VS2015 but I need the Pro edition of VS for features and use of TwinCAT.  What is entailed to upgrade VS to a newer version?  Would I require to purchase the full version of VS2015 from Microsoft or is there a lesser fee for an upgrade? 

Thanks,
Don

5
Open Discussion / Reading variables from PLC (Beckhoff)
« on: February 09, 2016, 08:54:42 AM »
This is not related to AdvancedHMI as I am not using it for this particular project that I have.  I need to read variables in the Beckhoff PLC from my .NET application.  I can write to the PLC from my .NET application but I am running into difficulties reading the variables.  I am using Structs to write variables to the PLC and I would like to stick to that convention when reading as well.  I have two thermocouple values that I need to read (iTC1_Val, iTC2_Val) that are in the PLC program.  These are in a Struct in the PLC and the .NET application. 

Thank you in advance for any assistance that can be provided.

'Create Structure in .NET application with the two variables
Code: [Select]
Public Structure ST_PLCAIChannelsINTS
        Public iTC1_Value As Short
        Public iTC2_Value As Short
    End Structure

'Create instance of the Structure, Ads objects for reading/writing, etc.
Code: [Select]
Public Class frmMain
    Private tcClient As TwinCAT.Ads.TcAdsClient
    Private dataStreamWrite As TwinCAT.Ads.AdsStream
    Private dataStreamRead As TwinCAT.Ads.AdsStream
    Private binaryReader As System.IO.BinaryReader
    Private binaryWriter As System.IO.BinaryWriter
    Private plcData6 As ST_PLCAIChannelsINTS

'Create same Struct in the PLC with same name with variables
Code: [Select]
TYPE ST_PLCAIChannelsINTS :
STRUCT
iTC1_Value : INT;
iTC2_Value : INT;
END_STRUCT
END_TYPE

'Create instance of the Struct in MAIN in the PLC
Code: [Select]
PROGRAM MAIN
VAR
st_PLCAIChannelsINTS : ST_PLCAIChannelsINTS;
END_VAR

'Read the PLC variables in this Sub.  This is what I have so far for code.  Is this correct?  What code syntax needs to go in the Try Catch block to perform the actual read?   
Code: [Select]
Private Sub ReadRegisters()
        Dim hvar As Integer
        Dim errorBits As New BitArray(Errors)
        dataStreamRead = New AdsStream(32)
        binaryReader = New BinaryReader(dataStreamRead)
        dataStreamRead.Position = 0

        Try
            hvar = tcClient.CreateVariableHandle("Main.st_PLCAIChannelsINTS.iTC1_Value")
            'Insert code for reading the PLC Struct variables here
        Catch ex As AdsErrorException
            MessageBox.Show(ex.Message, "ADS Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

6
Open Discussion / Re: EtherCAT master "INIT NO_COMM"
« on: February 03, 2016, 09:20:09 AM »
Thanks Archie.  I'll keep that in my notes.  The problem was I had the EtherCAT master configured to use the wrong adapter.  Because I was able to log in to the PLC and go online, I figured all of that was correct so I didn't bother checking it.  I had it configured to use one of the two Ethernet adapters instead of PCI, which is what it needed.  Banged my head on that one for longer than I care to admit, but I guess that's how you learn. 

7
Open Discussion / EtherCAT master "INIT NO_COMM"
« on: January 29, 2016, 01:48:59 PM »
I'm new to TC3 and in the process of commissioning a new machine.  We just got done wiring and power up.  In the EtherCAT master (Device 1 EtherCAT), under the "Online" tab, all the devices show "INIT NO_COMM".  I am using remote IO and using an EK1122 from the main rack to an EK1101 on the secondary rack.  The Run LED on the EK1122 is off, the led status lights on both EtherCAT connections is solid green, so according to Infosys, EtherCAT connections are good (good cable) but no communications on the EtherCAT bus.  That's obvious from my dilemma.  I have the EtherCAT cable running out from X2 on the EK1122 to X1 on the EK1101.  I believe that is correct as well.  I have 24VDC power running to both sets of terminals on the CX2100 (power supply) and the EK1101, so I should have power on the E-bus and power for the terminal I/O. 
It's obvious that I don't have E-bus communications but what is not obvious to me is why??  Any suggestions and what to try, or look for?

8
Open Discussion / Re: Beckhoff wire tag/labeling convention?
« on: January 20, 2016, 04:15:42 PM »
Ohhhh.....Ok, I got it.  You are giving the I/O point a specific descriptor in your declaration.  I'll probably revert to doing that too.  My declarations look like so:

MyDigitalInput AT %I*    :     BOOL;

Thanks for the feedback.

9
A user manual (pdf format?) would probably be tops on my list right now.  One that describes and provides example/s for every control available in AdvancedHMI.  Another feature is regarding the properties window for each control.  When one clicks on a particular property of a control, there should be a brief description down below in the description window that briefly describes what the property is for/does, etc.  For instance, when you click on the "Three State" property of a standard Windows checkbox, it says "Indicates whether the checkbox will allow three check states rather than two".  And so forth...

More controls would be another nice addition, even if there was a reasonable premium for them (I've purchased all premium controls available thus far).  Different types of valves (servo, directional, etc...), pneumatic valves.

I understand that this software if free, so I'm certainly not complaining.  Just some things that would be nice to have in future releases.  :) 

10
Open Discussion / Re: Beckhoff wire tag/labeling convention?
« on: January 20, 2016, 01:34:58 PM »
Ok, gotcha.  That's slick.  Wish we could do that here but I'd be too afraid to do it with the changes that sometimes happen with our machines.  When you say you use the same numbering convention in the program (as well as wire labeling), what specifically are you referring to?  As I'm new to TwinCAT (Using TC3), my understanding is you pick a variable name and then link it to the physical I/O.  Is there somewhere specifically within the program where you are also entering the wire number for that I/O?  Just trying to pick up any little bit of helpful hints as I learn this new platform.

Thanks,
Don

11
Open Discussion / Re: Beckhoff wire tag/labeling convention?
« on: January 20, 2016, 07:50:31 AM »
Thanks Archie.  That will work.  Also, do you ever use the little tags that snap into the top of each slice that appear to be for identification purposes of the slice/s themselves?  If so, what's your convention for that? 

Thanks,
Don

12
Open Discussion / Beckhoff wire tag/labeling convention?
« on: January 19, 2016, 04:07:24 PM »
I am new to Beckhoff PLC hardware.  I'm in the process of ordering components and drawing the prints.  I'm looking for norms/conventions that users use for wire labeling to/from the Beckhoff I/O as well as tagging the individual EtherCAT slices.  Beckhoff has a plethora of individual tags that you can purchase that snap onto the I/O slices, but I'm lost as to which ones to get, etc.  For our AB controlled machines, our typical practice is to label the wire to the I/O point as the specific physical I/O (I:02/04, I:02/05, etc...).

13
Archie,

I am using the serial port for coms between the SLC and PV1000.  The SLC is Ethernet and is routed to an unmanaged switch inside the control cabinet, whereby I can connect and go online with the SLC, with my laptop. 

14
Archie,

Reading this thread, I believe that this answers my questions regarding not being able to connect to SLC 505?  The machine is running right now and it uses a PV1000 for HMI.  I wanted to test some buttons and labels with AdvancedHMI and my program was not able to connect to the PLC when testing/debug.  I assume, after reading this thread, it is because the PV1000 is occupying the port??  If this is true, is it as simple as physically disconnecting the PV1000 from the SLC and then testing my AdvancedHMI solution??   

Thanks,
Don

15
Bummer.  I would like to use AdvancedHMI simply because the communications is simpler to deal with it seems without having to write the code line by line for everything that needs to be communicated back to the UI.  I will need to re-evaluate what hardware I would require if not using full Windows then.  I guess its not that big of a deal and I could still use a CX2040 with full Windows and just use a cheap Dell PC that we have laying around for the HMI program? This is an in-house machine so we don't need anything new and shiny for HMI, as long as its fully functional.  I don't require a touch screen either.  In fact, mouse and keyboard are probably more appropriate for my application. 

Pages: [1] 2