INFO: Dieses Forum nutzt Cookies...
Cookies sind für den Betrieb des Forums unverzichtbar. Mit der Nutzung des Forums erklärst Du dich damit einverstanden, dass wir Cookies verwenden.

Es wird in jedem Fall ein Cookie gesetzt um diesen Hinweis nicht mehr zu erhalten. Desweiteren setzen wir Google Adsense und Google Analytics ein.


Antwort schreiben 

OPC UA Labview Reading items and properties from excel sheet or text file?



Wenn dein Problem oder deine Frage geklärt worden ist, markiere den Beitrag als "Lösung",
indem du auf den "Lösung" Button rechts unter dem entsprechenden Beitrag klickst. Vielen Dank!

14.05.2016, 19:00
Beitrag #1

pato7 Offline
LVF-Neueinsteiger


Beiträge: 5
Registriert seit: May 2016

2015
2015
EN



OPC UA Labview Reading items and properties from excel sheet or text file?
Hello Guys,
I am a masters student at a German university now working on a research project and we are using OPC UA labview toolkit. I am new with using OPC UA in Labview so I am not sure to what extent are the capabilities OPC UA labview are similar to that defined by the OPC foundation. I hope I can get some tips and help on some issues.

Normally through labview we can create an OPC UA server and add folders/ Items/Properties to create the data structure. But this is done manually by adding the vi for each folder and item and connecting them. This is reasonable if we have two or three items or properties in the data structure. But if we have for example 40 items, then it would get messy. So i am thinking of a way to read the data from an excel sheet or text doc and automatically create the data structure in the OPC UA server. Offcourse, the data in the excel sheet should be arranged in a special way so that we can create the node paths easily and define the characteristics( read/write, datatype) of each node automatically. so far i was able to create the OPC UA server but I am stuck on how to transform the data from the excel file to the OPC UA server.
please find attached the VI i have so far.
Any help would be highly appreciated.
THank you.
BEst Regards,
Elias


Angehängte Datei(en)
0.0 .xls  Data2.xls (Größe: 8,7 KB / Downloads: 342)

15.0 .vi  fileread.vi (Größe: 38,25 KB / Downloads: 428)

15.0 .vi  non-Secureconnections.vi (Größe: 16,54 KB / Downloads: 334)
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
Anzeige
15.05.2016, 12:24
Beitrag #2

jg Offline
CLA & CLED
LVF-Team

Beiträge: 15.864
Registriert seit: Jun 2005

20xx / 8.x
1999
EN

Franken...
Deutschland
RE: OPC UA Labview Reading items and properties from excel sheet or text file?
Offtopic2
CROSSPOST: http://forums.ni.com/t5/LabVIEW/OPC-UA-L...-p/3295449

Das nächste Mal bitte selber darüber informieren (vgl. LVF-Regeln)

Next time inform everybody yourself about your crosspost.

Gruß, Jens

Wer die erhabene Weisheit der Mathematik tadelt, nährt sich von Verwirrung. (Leonardo da Vinci)

!! BITTE !! stellt mir keine Fragen über PM, dafür ist das Forum da - andere haben vielleicht auch Interesse an der Antwort!

Einführende Links zu LabVIEW, s. GerdWs Signatur.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
15.05.2016, 12:33
Beitrag #3

pato7 Offline
LVF-Neueinsteiger


Beiträge: 5
Registriert seit: May 2016

2015
2015
EN



RE: OPC UA Labview Reading items and properties from excel sheet or text file?
Sorry, But Do you mean I am not respecting the terms of use if I have posted the same question on two websites? Ni discussion forums and labviewforum.de are the same website? I thought they're different and hoped I can get more replies here, because I didnt get any so far.
Thank you.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
15.05.2016, 14:22 (Dieser Beitrag wurde zuletzt bearbeitet: 15.05.2016 14:26 von rolfk.)
Beitrag #4

rolfk Offline
LVF-Guru
*****


Beiträge: 2.305
Registriert seit: Jun 2007

alle seit 6.0
1992
EN

2901GG
Niederlande
RE: OPC UA Labview Reading items and properties from excel sheet or text file?
(15.05.2016 12:33 )pato7 schrieb:  Sorry, But Do you mean I am not respecting the terms of use if I have posted the same question on two websites? Ni discussion forums and labviewforum.de are the same website? I thought they're different and hoped I can get more replies here, because I didnt get any so far.
Thank you.

It's allowed to post on different places but good practice to mention that you did so (and in the case of the labviewforum even required by the forum rules). While it is fully understandable that you hope to get more answers by posting in different places you need to also consider the situation of people who spend their own free time to give you answers. It is VERY frustrating to spend half an hour to investigate some situation and put together a useful answer only to find out later that someone else has answered already on another forum the same or even better answer. That time could have been spent expanding on the already posted answer rather than repeating the same information again.

As such it's necessary to also mention that you posted on https://lavag.org/topic/19615-opc-ua-lab...text-file/
And yes there is a chance that you discourage some people from answering your post by mentioning that you posted in many other places about this, but not doing so will work even more against you, as there are people frequenting all these forums and they will notice and mention it, and make it even less likely that you will get answers after that.

Rolf Kalbermatter
Technische Universität Delft, Dienst Elektronik und Mechanik
https://blog.kalbermatter.nl
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
16.05.2016, 14:01 (Dieser Beitrag wurde zuletzt bearbeitet: 16.05.2016 14:09 von jg.)
Beitrag #5

jg Offline
CLA & CLED
LVF-Team

Beiträge: 15.864
Registriert seit: Jun 2005

20xx / 8.x
1999
EN

Franken...
Deutschland
RE: OPC UA Labview Reading items and properties from excel sheet or text file?
Offtopic2
Rolf, thank you for your elaborate explanation about cross posting. I could not have stated it any better.

@Elias: yes, labviewforum.de and ni.com are not the same website - we are not affiliated to each other at all.
And yes, you did not resepect the rules of this website by crossposting without notification. Read Rolfs comment about why that is considered as impolite.

Where else will we find your question? Rolf already mentioned the exact same question on LAVA, but I find another thread on LAVA, where you asked about the same probem: https://lavag.org/topic/19238-opc-ua/#comment-118257

Regards, Jens

Wer die erhabene Weisheit der Mathematik tadelt, nährt sich von Verwirrung. (Leonardo da Vinci)

!! BITTE !! stellt mir keine Fragen über PM, dafür ist das Forum da - andere haben vielleicht auch Interesse an der Antwort!

Einführende Links zu LabVIEW, s. GerdWs Signatur.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
16.05.2016, 14:29
Beitrag #6

pato7 Offline
LVF-Neueinsteiger


Beiträge: 5
Registriert seit: May 2016

2015
2015
EN



RE: OPC UA Labview Reading items and properties from excel sheet or text file?
(16.05.2016 14:01 )jg schrieb:  Offtopic2
Rolf, thank you for your elaborate explanation about cross posting. I could not have stated it any better.

@Elias: yes, labviewforum.de and ni.com are not the same website - we are not affiliated to each other at all.
And yes, you did not resepect the rules of this website by crossposting without notification. Read Rolfs comment about why that is considered as impolite.

Where else will we find your question? Rolf already mentioned the exact same question on LAVA, but I find another thread on LAVA, where you asked about the same probem: https://lavag.org/topic/19238-opc-ua/#comment-118257

Regards, Jens

Hello Jens @jg,
Thank you for your constructive replies. No I don't have any other questions. You did good job searching and finding my 2 questions on the other 2 sites. As I have explained and appologized before, I didn't know That I should have mentioned "cross post" in my question description. I am a newbe here, its my first two questions ever posted and probably last on labview forums and I didnt think it would be such a big deal to post on different sites. never meant to be impolite so be easy on me I am a new userSmile You didn't have to ruin all my posts on all three sites. Now I am not getting any positive replies after your helpful comments. I totally understand I did something wrong. And if you can help me delete my posts on this site would be great because I am not able to delete the question for unknown reasons although I am the one who created them. Do you have adminstrative access here?
Best Regards
Elias
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
Anzeige
16.05.2016, 16:36 (Dieser Beitrag wurde zuletzt bearbeitet: 16.05.2016 16:37 von GerdW.)
Beitrag #7

GerdW Offline
______________
LVF-Team

Beiträge: 17.467
Registriert seit: May 2009

LV2021
1995
DE_EN

10×××
Deutschland
RE: OPC UA Labview Reading items and properties from excel sheet or text file?
Hi Elias,

Zitat:You didn't have to ruin all my posts on all three sites. Now I am not getting any positive replies after your helpful comments.
Jens didn't ruin your posts, it's just your cross-post behaviour…
How will you get any responses at all when you even want to delete your questions?

And please don't forget: we had a weekend where people tend to do other things than solving your LabVIEW problems. We also have a national holiday where people have even less ambitions to solve your problems. Other countries often also celebrate these holidays so you cannot expect answers from the international audience on NI.com or lava.org!
Please be (more) patient!

Zitat:I am not able to delete the question for unknown reasons although I am the one who created them. Do you have adminstrative access here?
No, you cannot delete threads here in the forum. The same applies to NI.com or lava.org…
I'm against deleting your question: maybe someone else will provide an answer in the next days?
You learned the fact to mark cross-posts as such - as is expected in all those (LabVIEW) forums around the world!

Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
16.05.2016, 16:57 (Dieser Beitrag wurde zuletzt bearbeitet: 16.05.2016 16:57 von GerdW.)
Beitrag #8

GerdW Offline
______________
LVF-Team

Beiträge: 17.467
Registriert seit: May 2009

LV2021
1995
DE_EN

10×××
Deutschland
RE: OPC UA Labview Reading items and properties from excel sheet or text file?
Hi Elias,

to provide an answer to your question:
Zitat:This is reasonable if we have two or three items or properties in the data structure. But if we have for example 40 items, then it would get messy.
Instead of calling "Add Item" by coding it for each single item you should put this function in a FOR loop!
Read your Excel data, analyze it, then create the input cluster to "Add Item" as needed for this function…

Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
16.05.2016, 17:01
Beitrag #9

jg Offline
CLA & CLED
LVF-Team

Beiträge: 15.864
Registriert seit: Jun 2005

20xx / 8.x
1999
EN

Franken...
Deutschland
RE: OPC UA Labview Reading items and properties from excel sheet or text file?
(16.05.2016 14:29 )pato7 schrieb:  Hello Jens @jg,
Thank you for your constructive replies. No I don't have any other questions. You did good job searching and finding my 2 questions on the other 2 sites. As I have explained and appologized before, I didn't know That I should have mentioned "cross post" in my question description. I am a newbe here, its my first two questions ever posted and probably last on labview forums and I didnt think it would be such a big deal to post on different sites. never meant to be impolite so be easy on me I am a new userSmile You didn't have to ruin all my posts on all three sites. Now I am not getting any positive replies after your helpful comments. I totally understand I did something wrong. And if you can help me delete my posts on this site would be great because I am not able to delete the question for unknown reasons although I am the one who created them. Do you have adminstrative access here?
Best Regards
Elias
Apology accepted. Please do not feel discouraged from asking further questions - as long as you stick to the rules. I agree with Gerd, your thread should not be deleted. Perhaps you will still get an answer. And it might be helpful for other people, since the cross-posts are now clearly linked and there are already a few answers on LAVA.

Regards, Jens.

Offtopic2
BTW, how about practising your German, as your are a student at a German university. Schreib deine Beiträge doch mal auf deutsch. Wink

Wer die erhabene Weisheit der Mathematik tadelt, nährt sich von Verwirrung. (Leonardo da Vinci)

!! BITTE !! stellt mir keine Fragen über PM, dafür ist das Forum da - andere haben vielleicht auch Interesse an der Antwort!

Einführende Links zu LabVIEW, s. GerdWs Signatur.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
16.05.2016, 17:42 (Dieser Beitrag wurde zuletzt bearbeitet: 16.05.2016 17:50 von pato7.)
Beitrag #10

pato7 Offline
LVF-Neueinsteiger


Beiträge: 5
Registriert seit: May 2016

2015
2015
EN



RE: OPC UA Labview Reading items and properties from excel sheet or text file?
(16.05.2016 16:57 )GerdW schrieb:  Hi Elias,

to provide an answer to your question:
Zitat:This is reasonable if we have two or three items or properties in the data structure. But if we have for example 40 items, then it would get messy.
Instead of calling "Add Item" by coding it for each single item you should put this function in a FOR loop!
Read your Excel data, analyze it, then create the input cluster to "Add Item" as needed for this function…

@GerdW Thanks for the tip, highly appreciated. I'll work with itSmile


Apology accepted. Please do not feel discouraged from asking further questions - as long as you stick to the rules. I agree with Gerd, your thread should not be deleted. Perhaps you will still get an answer. And it might be helpful for other people, since the cross-posts are now clearly linked and there are already a few answers on LAVA.

Regards, Jens.

Offtopic2
BTW, how about practising your German, as your are a student at a German university. Schreib deine Beiträge doch mal auf deutsch. Wink
[/quote]

@jg Thanks for the advice. I hope I'll get more answers in the coming days.
Offtopic2 Considering that I arrived in Germany recently, I have limited level of Deutsch. But I'm definitely looking forward of reaching a level where I can communicate in Deutsch. Working on it.Wink
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
30
Antwort schreiben 


Möglicherweise verwandte Themen...
Themen Verfasser Antworten Views Letzter Beitrag
  Items im Menu Ring ändern kind_devil 3 3.493 13.06.2022 08:44
Letzter Beitrag: Martin.Henz
  Element von Text File in Array speichern und bearbeiten dexter 4 5.107 02.08.2012 10:33
Letzter Beitrag: GerdW

Gehe zu: