Jump to content

nistam

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Everything posted by nistam

  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 ?
  16. Thanks guys. Michael, i already have OpenG toolkit, but.... i've used only o bit of it ((( Thanks to both of you.
  17. I have created an application that reads some digital signals through a PCI-6503. This application does not need user intervention and has to be installed on at least 30 computers, so a problem has arised, how i could upgrade my application remotely from time to time to all of these PCs at once, without my intervention. I've thought of copying my built EXE to a FTP server and, between specific time intervals, querying that server for a new EXE file from within my application. If a new one exists, then download the file and...then what? My application must be automatically stopped, and somehow place the new exe over the old one...maybe a computer restart that replaces the old EXE. I don't know how i could do this kind of restart with LV7.1 and Windows 2000. I don't actualy know if my thought stands. I've also thought of creating a small EXE that should run all these VIs that do my job. These VIs should be external. Has anybody come through such problems? Thanks guys.
  18. Ok, i have an application that reads data from serial port. In the meanwhile the user must click a button that shows up a dialog, where he must enter some information. During that time the application stops reading data and waits for the dialog to close. In Visual Basic this kind of task can be accomplished by using API functions.This way you can have a dialog box displayed, and at the same time the timer display on your main form keeps on. I guess this is multithreading, but i know that labview IS multithreaded. I thought of using Call by reference or Open VI by reference. Any ideas or thoughts?
  19. My application accesses a PCI-6503. Everything works fine if the logged user has administrator privileges. If not, the program displays some errors, starts, but nothing else happens. I must not give administrator privileges to this user and also to every user on the network that has the same application and NI card installed. Do i have to give administrator privileges to specific directories and registry keys?
  20. Yes!!!!!!! God, how blind I am!!!!!! I was seeing the ROW terminal on the left of the double click event, but i was not thinking at all "What is this? Maybe I should use it." Thank you very much, todd, for opening my eyes. )))
  21. Hello guys. I'm using Labview for one year. I've played with lots of stuff including Database Connectivity toolkit. I'm stuck in something that maybe simple. I have a multicolumn listbox and i want to manage it's data. I want to add (no problem), edit/replace and delete. To perform the last two actions (edit or delete) i must know the row the user clicked and feed the replace array or the delete array VI. So i use the Get DblClk row method. My problem is that i always get -2, which means the user has clicked on a empty row. I'm using event programming to reduce polling.Everything is working fine, but this. Which event must i associate with this method? I have also created a simple vi with one multicolumn listbox inside a loop (no events at all). The same happens. What am i doing wrong? The online help....doesn't help at all!!
×
×
  • Create New...

Important Information

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