none
Making a desktop application to act like link between a SQL database and a robotcell. RRS feed

  • Question

  • Hey, for a school project I am going to make a program who can receive data from a testing station (PLS) inside a robot cell, take these test results and store them in a MS SQL database. I have very little experience with this sort of stuff, so I do not know where to start.

    I have sort of understood that it is possible to make an application like the one I want in Visual studio. However, I do not understand what the end product would look like. Will the end product just be a program running in the background doing what it should do? Is it something running on the server? Is it a program with a UI? I have some problems visualizing what the end product should look like. 

    I have been in touch with an expert who is helping me, and he proposed to use table adapters. To provide communication with the database.  I have tried googling for solutions and have looked at some things, like LINQ to SQL for example. But, I don’t fully understand where I should start this sort of thing. 
    Any tips on where I should start?

    I really appreciate any help.

    Wednesday, March 16, 2016 7:52 AM

Answers

All replies

  • Hello,

    can you post more infos about that PLS station? What's that? Can be programmed with which language? Name of manufacturer?

    Update: didn't mean PLC station? I will be starting research of system, how to get data from that 'station', via which interface. I think this is priority for you. If you'll know what kind of data you can get from that device, you can think about visual representation of your application.




    • Edited by Duris_I Wednesday, March 16, 2016 12:57 PM
    Wednesday, March 16, 2016 8:40 AM
  • Hey, thank you for answer. The robot cell we are working with is something like this: https://www.robots.com/faq/show/what-is-a-robot-cell only a few years older. And yes I think PLC is the same as a PLS

    I want to explain how we plan to solve this project in more detail. So the PLS in the robot cell is an old one. We plan to upgrade it to a Siemens S7, Cp340. This has a Software Development Kit. We plan to have it send the data as ASCII over the local network, to the server where we get the data through a COMport, and a COMport software, into the program (I am going to make) and then into the SQL server. The expert I have been talking to, let us call him Bob, has said the only thing we need to account for is that the RS232 sends with the same baud rate, data bit, stop bits, parity and flow control/handshake. Other than that, the PLS programming is not something I am going to be doing, so you can assume that the data coming in is just a string.

    That is how we plan to solve this. The workflow from the PLS up to the point the data arrive at the server, is somewhat set in stone, because we are working on a system which is configured in a certain way. So what I am working on is this program who can take input form the COMport software, I think this is just a string, and then write it to the database. What sort of programming language I use is totally up to me, but Bob has suggested C#. Since I made this thread, I have been in contact with Bob and he sort of answered what was unclear. He suggested that I make the program as a service application, https://msdn.microsoft.com/en-us/library/zt39148a(v=vs.110).aspx#BK_Install. I am reading up on this now, as far as I can understand this then runs with the server and you can make it update when new data comes in. Bob also suggested that I use command objects to insert into the database. https://msdn.microsoft.com/en-us/library/ms233812.aspx

    I think this is a good starting point. The thing that was the most unclear for me was how the program would run/execute. But, I got my answer: in a service application.

    I am still looking for feedback, so if you have any inputs on how I should start or things I should think about to make this work, I would really appreciate it. 

    If anything was unclear please tell me and I will try to clarify. I apologies for any typos or spelling mistakes, English is not my first language.


    • Edited by Vegdji Wednesday, March 16, 2016 2:16 PM
    Wednesday, March 16, 2016 2:14 PM
  • Hello,

    you can be probably lucky, because I'm working with S7 systems over 16 years and CP340, simply communication is my friend of bussines, so if you'll have any questions also to this, go ahead. I'll try help you as I have free time. If BOB sometimes visiting Siemens general Support Forum, he probably may know me. In my side working with C/C++ but probably also can help in .NET.

    Update: ok start as Bob instructed, get help from him as you need, he know why gave you this idea, I think so. But be kind inform here how you going. Maybe sometime will be helpful to you also.

    Regards...

    Duris_I



    • Edited by Duris_I Wednesday, March 16, 2016 7:11 PM
    Wednesday, March 16, 2016 6:17 PM
  • Seem you want to write the data that you collected into database using C#. You have an intention using ADO.NET Dataset. That sounds right.

    You can get the information from below links:

    Updating Data Sources with DataAdapters

    https://msdn.microsoft.com/en-us/library/33y2221y%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    How to: Insert New Records into a Database

    https://msdn.microsoft.com/en-us/library/ms233812.aspx

    Good practice of CRUD by creating SqlDataAdapter when you cannot use Entity Framework episode 1 – sample and videohttps://chanmingman.wordpress.com/2011/05/14/good-practice-of-crud-by-creating-sqldataadapter-when-you-cannot-use-entity-framework-episode-1-sample-and-video/

    chanmm


    chanmm

    Saturday, March 26, 2016 6:51 AM