Jump to content

nistam

Members
  • Content Count

    21
  • Joined

  • Last visited

    Never

Community Reputation

0

About nistam

  • Rank
    Active
  1. Forget it! I was also using the following code: dst.ReadMode=Readmode.Synchronous which i removed and now it works! Thanks!
  2. Hi guys, Using Visual Basic 2005 and Measurement studio Enterprise 8.1, i must create an application that reads an integer value from a remote OPC server running WINCC 6.0. My code is simple and as following: dim Value as integerdim dst as new Datasocketdst.connect("opc://my-server/OPCServer.WinCC/my-item")Value=ctype(dst.data.value,integer) The above code works fine when i run it as a windows application. BUT, no user will be operating the computer that this application will run. That's why i decided to create a Windows Service, using the same code. But as a service, it does run though, but it does not return any value. The value is always zero and no errors are produced. The service starts with user credentials that have access to the remote OPC server. As i said, as a Windows applicaction, it runs fine. Do any of you have done something similar and had such problems Regards! Nikos
  3. Hello Mize In my industry, at first we "solved" this problem problem by installing Step7(or Wincc and just declare every tag on a dummy project) on the same computer as labview, or RSLinx if the PLC is Allen Bradley. In every case we need a license from Siemens or AB, something that was out of question, especially for Siemens, because they are TOO expensive, even for a single license. Then we found out about IBHSoftec, which besides the OPC server provides some nice tools and cables, AND S5 for Windows. Hope i helped.
  4. Thanks. This is nice! And simple too!
  5. We recently installed 4 industrial printers (Domino model A400) that will print on coils every 2 meters. These printers have a large keyboard attached on them so the user can enter, for example, our company logo and various information regarding the material that the printer shall print on. The user though, can't enter the same info on 4 printers so I created a small app to test the serial communications with one of them and emulate the user input. Everything ok, because the idea is simple: Ask for the printer status, if ok, send a specific message ( the logo i mentioned) and ask for the status again. Just that. Now, in theory, i can copy-paste the same code 3 more times, and just changing the serial port every time, for every printer. I just can't imagine how i'm supposed to include 4 serial connections in a loop. Any ideas or different approaches on this?
  6. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! We use IBA's products !!!!!!!!!!!!!! (Don't ask me where i work, i just forgot it ) But they are too expensive, that's why i believe that in my case reiventing the wheel is cheaper!!! I mean, this is a small application aqcuiring 2 signals. Why pay 30.000 euros at lease when i can built it myself? The problem is not aqcuisition itself, but saving it. Anyway thanks, for an answer. I really appreciate IBA's products, as we use it every single day without problems.
  7. The following is the answer from the NI forums: "I may have made some headway in getting the GetEnumerator class working. Go to Tools>>Advanced>>.NET Assembly References and you'll need to add the MSCORLIB assembly. It should be located in the path WINDOWS\Microsoft.NET\Framework\v1.1.4322, although my version may be different from yours. Once the assembly is added, click OK and restart LabVIEW. Doing this appears to give you access to the Enumerator methods for a Data Column Collection. Best of luck! E. Sulzer Applications Engineer National Instruments " And that worked for me!
  8. I have created a Web service in VB.NET. This service returns a dataset. To call it from within Labview i created a .NET assembly that actualy calls the web service. So far i can get the name o f the returned table (the table that the .net assembly returns after it calls my web service), but i can't iterate through it's datarows and columns. For example, i can get the number of the columns that a datarow has, but i don't know how to get the column names for this datarow, because i can't get the enumerator for the columns collection. The GetEnumerator has no properties or methods for iterating. Anybody has any ideas or have tried something similar? (This has also been posted in NI forums, sorry but i'm in a hurry for an answer)
  9. Hi guys. I have created 4 different applications that do data acquition using cards from NI and MS SQL Server. The logic is the same for all of them: I use text files separated with TAB. I open a handle to the file outside the main loop, inside the loop i do the acquisition, and finally i close the file. Then i initiate a job on the SQL Server with runs a DTS package that uploads this text file to a database LOCALY (text file and database on the same computer!) and then deletes this file. It will be created by the next acquisition procedure. For a specific application, the measurement file is more than 30MB long, containing approximately 850.000 records!!! The acquisition rate is very high, 250 samples per 50ms. No, it can't be reduced at all! All these records where impossible to be uploaded to SQL Server that's why i created the job, to have the server do the upload and leave my application in peace to perform the next measurement. I must admit that the upload of the file from the Sql server is VERY quick, about 1 minute for all of these records. And here arises my problem. My industry produces alluminium coils. The application i mentioned, takes thickness measurements from 50 coils per day. Imagine this, 50 coils X ~850.000 samples per coil = 42.500.000 record PER DAY!!! What about per week or per month??? My database would be very large not only beacuse of the amount of containing data on disk, but the number of records. A SELECT query may take up a long time to execute. I've thought of keeping my data in BLOB records, but then i would not be able to perform agreggate functions, or make comparisons. I've also thought of leaving the text files intact, and just adding one record for every coil, containing the path information for the data file (the TAB separated file). I must mention that my software works fine, the DTS on the SQL server does its job nicely. I just want to hear what people, that have been involved with data acquitition for years, have to say about this. Here is the structure of the data file: Date/Time {TAB} Entry_Thickness {TAB} Exit_Thickness 02/08/2005 10:54:21.21 {TAB} 0.0732 {TAB} 0.0660 02/08/2005 10:54:21.25 {TAB} 0.0736 {TAB} 0.0658 ..... ...... ..... This file is viewable with NOTEPAD. But it never actually opens. Too large for notepad! What about saving to binary files? I've thought of this but never implemented it. Any thoughts? I'm sorry for the length of my post. Thanks a lot Nick The Greek
  10. DON'T BOTHER at all! NI has it! Some times i feel so idiot! I could search NIs KB before posting here.
  11. Hi folks. I created a database with more than 256 fields on a table. Actually the number is 598! Anyway, the cluster size can be only 256, so i can write only 256 with one call. My problem is that i must write all the 598 at once. I've thought of writing the first 256, then go back to that data row and write the next 256 and so on, but i gets complicated... Has anybody found a solution to such a problem, a workaround or something? And guys, NO, i can't (and won't) split all these fields to 3 tables.
  12. I open two refferences to both serial ports outside the main loop. I use tunnels when the loop starts. I destroy these refferences after the loop stops. Inside the loop, i open one (or two, it depends on the settings' file) connection to my OPC, ONLY when i have new or changed data. After that i immediately close these refferences. So, nothing remains undestroyed. I'm only thinking of those tunnels for the serial refferences. Maybe i should use shift registers.
  13. The last few days i created an application that reads data from both serial ports and forwards them to a OPC server. Today i noticed that my application had crashed and Windows had displayed a message that my system was low on virtual memory. I reset the system and i re-run the application, having the task manager opened. I noticed that the memory usage of my exe was taking more and more memory (starting from 21.520KB) as the seconds went by. In 5 minutes my app was using 25Mbytes! What i do in my application exactly, is opening the 2 serial ports then i enter the main while-loop, then every 2 seconds i read from the 2 serials and if i have new data i open a connection to my OPC server (a WinCC scada) and write them to 2 different tags, and finally i close the connection with the OPC. I read two I8 values and i write them to two I8 tags. I must say that i have not used error trapping extensively. Does anybody have come through some such problems with extensive memory usage from one small EXE made with Labview? Could it be possible that my minimal error trapping can cause such problems???
  14. Sorry for the delay, i was away for a few days. Well, to tell the truth my question is about how to handle OPC connections if the OPC server hangs for some reason, and not how i send data. In my ocassion i connect to a SCADA created with WinCC v6.0. If i attach my control to the OPC from the control properties and not by code, then everything is OK. But i would like to give myself the opportunity to select a different tag name from the server, because not all SCADAs use the same tags Anyway thanks for the interest.
  15. Hi guys. I've created a small application that occasionally must write a value to a remote OPC server. If the remote OPC item is 16 bit long and I'm writing a 32 bit value, then my application never writes this value again, and somehow destroys the connection handle with the OPC server. I just have to restart my app. Does anybody know a nice way to handle OPC connections ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.