Jump to content


  • Content Count

  • Joined

  • Last visited


Community Reputation


About nistam

  • Rank
  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
  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 stat
  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
  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 iterati
  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 fi
  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
  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.