Jump to content

Rolf Kalbermatter

Members
  • Posts

    3,794
  • Joined

  • Last visited

  • Days Won

    248

Posts posted by Rolf Kalbermatter

  1. Thanks so much :worship: !

    I went to MicroDAQ to have a look, but it seems there aren't any Linux-compatible dataloggers. As my computer runs on Linux, I think I have to use some Windows-emulating software like WINE. Do you guys know whether the dataloggers work with WINE?

    Thanks in advance!

    Raymond

    Wine won't allow you to access plugin hardware or such. So I think it is not a good idea.

    If you can't find a manufacturer that has native Linux drivers for its hardware, you have only two choices: Either you go with an intelligent external datalogger that interfaces to the PC over TCP/IP or serial and then you won't need to run Windows software in order to get it working, or you have a plugin DAQ hardware and then you need the according device drivers, but Wine can't be used as gateway for Windows kernel drivers and as I see their policy probably never will support a Windows kernel subsystem that could do that.

    Rolf Kalbermatter

  2. I don't know about either of those interfaces but I had had good experiences with National Instruments NI ENET-232/4 and it would only stand to reason that they (NI) would make an effort to make it compatible with the LabVIEW. After installation it just shows up in MAX as additional serial (COM) ports and you talk to it using the ordinary VISA serial routines. In one situation I'm using 6 ports (2 interfaces off of a hub on a private network) and it has been fast and trouble-free. I like it.

    They are very nice, but if you happen to have a Hyperthreading machine, you definitely need to install the latest drivers. We were having some problems begin of last year with those Enet-232/4 on a Hyperthreading machine after the older computer had died, and no matter what we tried we had to dust of some other non-Hyperthreading machine to run our application without intermittant crashes. It took about half a year before a new driver was available. However I haven't tested it until now, since the old machine is runnig just fine and I don't like to make modification to a running production system.

    Rolf Kalbermatter

  3. Hello Khalid Ansari,

    I receive email with the labview.

    I connect the email server to receive the email, I make authentication and I introduce the password.

    Will it be that have authentication/password with server smtp? But with VI smtp of the to do that? :lightbulb:

    thank you

    Receiving email is done with the POP3 protocol (or some more advanced one). There authentification is always necessary since you can look into the mail box of a person. To send emails you are using an entirely different protocol called SMTP. SMTP is completely independant of POP3 and had traditionally no need for authentification before the sh*theads of spammers started to poisen email.

    I'm not sure where you got the POP3 VIs though, maybe the Internet Toolkit or OpenG, because LabVIEW does NOT come with POP3 VIs out of the box.

    The LabVIEW email VIs implement the SMTP protocol but without support for authentification. But since you get error 62 I think it is likely that you don't even get the the point where authentification is required but rather that a firewall or something like that is dropping your connection immediately. This is:

    1) A problem most likely entirely out of control of LabVIEW, eg. your network setup.

    2) Something you will need to investigate by debugging into the LabVIEW VIs (single step mode, etc. etc.)

    3) By going into the email subVIs you can also see what the server is answering if any and only with that detailed information is any chance that someone else here can help you.

    Rolf Kalbermatter

  4. :oops: . I didn't know you could wire a string to the resource name terminal of the serial open subvi. :worship:

    That's the set up MY system, not the system the compiled program is running on! I have no trouble with the alias names... it's the end users that get confused.

    What I did once in an application was using the enclosed VI. Use the alias array to initialize the strings of a Ring Control. Then use the selection of the Ring Control to index into the adress string array and pass this to the VISA Open.

    Rolf Kalbermatter

    Download File:post-349-1140556159.vi

  5. I am to use the version 7.1. Did I try to use smtp of the labview (the examples) but don't I get to send email???

    And on, to send sms??

    Considering that the SMTP VIs are with full source code you could certainly go a little deeper and single step into them to see what the problem is. The SMTP VIs as they come with LabVIEW 7.x and higher work very good but have a few limitations.

    First they have no support for authentification. If your SMTP server requires authentification then you will have to look for alternatives.

    Second they can NOT make a hole into your firewall on their own, both on your computer nor some gateway on the way to your SMTP server. You will have to configure the firewall(s) to allow the SMTP traffic to go through.

    Sending SMSs is a completely different story. You can directly communicate with the GSM modem through VISA and the serial port but not every GSM modem has exactly the same command set. Also to get a reliable communication with a GSM modem that does always work independant of the initial state of the modem is quite some work. I have done it in an alarming and messaging application for Wismo GSM chip based modems (Wavecom and Maestro) and it wasn't trivial. Our company also sells a Toolkit to talk to these modems http://www.citengineering.com/pagesEN/products/sms.aspx

    Another possibility is to buy some ready to run SMS application and install it and interface to it through ActiveX, TCP/IP or whatever it supports. If your messaging and alarming should be reliable writing your own solution won't be a very straightforward and fast way to do it.

    Rolf Kalbermatter

  6. You are right, I can't close the handle. I tried a CallLibraryNode with kernel32.dll/CloseHandle but I get an error. So I included the line

    You probably tried to do some fancy datatype here. Just treat the handle as uInt32. In the Logon function this parameter is passed as Pointer to Value. In the CloseHandle case just as Value only since it is not a parameter by reference here.

    Rolf Kalbermatter

  7. Hmph, learned something new. :thumbup:

    It works because you are not replacing the enumerated value used as the page selector. You are just hiding it and instead displaying an independent (cosmetic) string in its place.

    post-2800-1140012434.png?width=400

    This was an addition to LabVIEW 6.1 exactly because you couldn't rename a Tab in a TabControl. Making a TabControl behave like a RingControl instead was no option as that would have caused problems with backwards compatibility and in fact removed some functionality and ease of use from the TabControl.

    Rolf Kalbermatter

  8. Thanks Rolf, you understand the user's psychology perfectly :) Making money from IVision was never the first thing, but I think couple of my white hairs deserve something, I could have saved them :) , kind of regreting... that is why IVision is not totally free yet:)

    Hey, don't tell me you have white hair! In my age that is something that comes to men naturally but for you I had thought that will take some more time :-)

    Good luck and may IVision still bring you some compensation for whatever you've put into it.

    Rolf Kalbermatter

  9. Hi everybody!

    I've a problem with calling Windows API: I need to work with Active Directories on Windows Server 2003. On start I want to login with the LogonUser function of the advapi32.dll.

    I tried to call the function via LV dll-call without success (I use LV 7.1). After this I wrote an CIN for this. But it don't makes me happy. I alwas get an error (not enough space). I'm confess that my C is not 100% good, but it's sufficed up to now.

    Jens

    First:

    GetIndirectFunctionHandle and friends were only meant and available for LabVIEW for Windows 3.1.

    Second:

    In order to call a function over a pointer variable, this pointer variable must be properly typed either through the declaration itself or a typecast at the point of call. Otherwise the C compiler can't know how to pass the parameters and what to expect as return value.

    if (!(UsernameCStr == (char *)DSNewPtr(*Username)+1)) {cinErr = mFullErr; goto out; }

    will allocate not what you think it does. It will use the pointer value in the handle as length indicator and attempt to allocate potentially a huge amount of memory running out of memory quite soon.

    You should make this read

    if (!(UsernameCStr == (char *)DSNewPtr(LStrLen(*Username))+1)) {cinErr = mFullErr; goto out; }

    and even better would be to allocate a cleared memory area with DSNewPClr().

    Instead configuring a CallLibraryNode with advapi32.dll, LogonUserA, stdcall calling convention, the string parameters as C string pointers and the two constants as uInt32 and the last one as an uInt32 passed as pointer, simply should work fine.

    Last but not least you will leak a handle here with LogonUser returning the phToken that never gets closed.

    Rolf Kalbermatter

    Download File:post-349-1140011772.vi

  10. nothing. its free of charge and it's updated regularily, because I use a DB in allmost every project. :-). If you want to use it - you are free to do so, if you don't like it ... don't use it :-). it's just an other choice, like you have the choice to drive a VW, or a BMW, or a Mercedes ... ok, i own an Audi ;-)

    I did not know about LabSQL, when I started developing my toolkit, and i started developing, because i was to cheap to pay for the NI Database connectivity toolkit :-).

    Last but not least, i do a lot of work, others have allready done, because I want to learn how thinks work on my own. My ADO-Toolkit is a result of studying the VB-ADO MSDN-Help ... I think, the best way to learn stuff, is to write a tutorial :-)

    cheers!

    CB

    I didn't now that you didn't know about LabSQL then. To me it had seemed the most efficient way to build on LabSQL and improve and extend on that one, seeing that you have mostly the same licensing philosophy as the original author of LabSQL. Would have saved you quite some time ;-).

    And improving and extending an existing Toolkit probably just as much gets you into learning the basics of it.

    Rolf Kalbermatter

    hi i2dx thanks for your ADO-Toolkit , when update the DB tools using ado.net .

    Why should anybody want to do that? Database Access over ADO works well, is supported on many more machines than .Net (.Net only working under Windows 2000 after installing an update) and most database drivers are either ADO or ODBC based. Using .Net would just add an extra complexity level to the already involved picture of ODBC driver->ODBC manager->ADO-ODBC gateway->ADO system->ADO->ActiveX interface.

    I can think of many better ways to spend CPU cycles, memory, and HD space.

    Rolf Kalbermatter

  11. Scripting exists. Scripting works. Scripting makes scripting.

    The only way (right now) to take away scripting is to make scripting not work.

    But, NI needs scripting to work, since NI uses scripting. So, scripting will remain.

    The only way to kill so-called *unauthorized* scripting is to fix significant problems in LabVIEW security, which is a tradoff that I will gladly accept once it arrives, and I will send NI my most sincere thanks and appreciation. We are already seeing some security improvements with Project Libraries in LabVIEW 8.0.

    Cheers,

    I can think of a few not so complicated runtime checks that would disallow the workaround found by Stan and if I can think of it, the guys at NI can for sure as well. If they find it necessary to worry about that one, I'm however not sure.

    Rolf Kalbermatter

  12. :oops:

    Thanx Micheal,

    However the articles I got 4m google states how to use C++ or assembly codes to read BIOS number. How abt using Registry to read BIOS number??? I saw an article stating that registry too holds this numebr. My question is ... ho follproof is this (to read 4m registry??). Does every manufacture load this value in registry??

    If there is some other method also pls let me know

    While the registry might hold this number somewhere it is not terribly difficult to hook the registry access and return to a specific applciation different information than to the rest of the system. It definitely gives an attacker an extra angle to get in, and if you consider HD serial numbers not secure enough you must envision a dedicated hacker and not just the joe average user that knows little more than how to start an installer.

    Of course you can even fool a tool that gets the information directly from the BIOs but that really requires some assembly and protected mode knowledge, although that knowledge is not something strange among real hackers.

    Rolf Kalbermatter

  13. my question is:

    Is anybody out there with an activated and licensed LV8 scripting?

    If yes, what did you do to get it? Can I get it, too? ;)

    I for one don't but I happen to have played with the functions in LabVIEW 7.1 recently and probably come across a possibility similar to what Stanislaw has done in his other thread where he handed us the ladder to reach the toys, NI in its universal wisdom had put on a very high shelf. But I also can envision that NI might try to close that loop hole too, putting even the execution of certain nodes behind the licensing.

    Rolf Kalbermatter

  14. HI,

    Thanks for the reply, figured out myself after 2min from the post :) .

    Now I have another question, anything new with scripting and labview 8? it's a great tool and is funny to get stuck in labview 7 just for scripting

    thanks

    Yes, scripting is now not anymore controlled with an ini file setting, but through the license manager. (In fact it seems LabVIEW still wants to have an ini file setting but it will only check this setting after you have installed a valid scripting license, and no it is not the same ini file setting as in the past :-(

    Rolf Kalbermatter

  15. Hi Jim,

    Thanks for the information. :thumbup: I want to know if the Aerotech controller device appears in max (I doubt :D ). If not, then do they have a configuration software similar to max.

    The MAX API is private and undocumented. Nobody outside of NI can write drivers that integrate with MAX directly (aside from the standard OS drivers such as COMM for serial ports) that integrate in MAX. I doubt that there are many manufactuerers that have such an integrated and feature rich configuration interface for thier hardware as what you get with MAX.

    Rolf Kalbermatter

  16. Hi Rolf,

    Thanx 4 ur prompt reply. I use scripting for LabVIEW 7.0 by enabling superscript node from the INI file. I came across an application in which the user at runtime, from a multi column listbox can set breakpoint to any of the Test cases listed in this listbox. Similarly I saw some image on LAVA forum, which shows a property node to set break point on any wire at runtime.

    Can anyone explain how to achieve this in LabVIEW 7.x atleast.

    Not exatly sure as it is a long time ago when I investigated scripting. But if my memory serves right you will have to walk through the rather large LabVIEW object hierarchy to get to the wire in question and then using a Method (or was it a Property) node you can set the breakpoint on that wire. As to how to walk the object hierarchy of a VI, there have been several examples here on Lava but it is a pain indeed. The problem is, I can not see another possibility to implement this object model in a way that would be much easier to walk and understand without loosing tons and tons of possibilities.

    Personally I think this is the main reason NI has not decided to make this feature available to outside people since they can envision a load of support requests if that feature gets made public.

    Rolf Kalbermatter

  17. Hi Rolf, I am confused with your reply.

    Are you asking a question or are you giving a solution to the problem. If it is the later please provide more details. How or where do I insert double quotes around the path to the files. As a user I can only click to select the files to compare? Remember I am using meta-diff from within the explorer and not from the command Line. Many thanks Dimitris

    I'm posing a possible explanation to the problem. It seems that your error message contains a path that is only partly complete (breaking at the space in National Instruments). Obviously at some place the path construction is not done correctly and if you pass a path to a command line tool containing spaces and that path is not embedded in double quotes the command line tool will see the path as multiple command line arguments resulting in each argument to be an invalid path.

    I wasn't saying that this is something you did wrong but that it is something with lvmetadiff and or other tools involved. Since they are however all Open Source and available in source code there is no reason why you shouldn't be able to go and try to fix the problem for yourself.

    Rolf Kalbermatter

  18. Thank for all,

    On conclusion i will try to find a sourc code on C wich access the port, i compile on linux and i join this with a cin node?

    Is correct thats? Thank you for all reply.

    Nic

    This won't work. The CIN node or shared library is still running in the application context and as such has no direct access to the protected kernel resources to whom the Port IO adresses belong. You have to extend your kernel itself to allow port access either by a port IO kernel driver that translates your port access requests to the actual hardware access on behalf of your application or by an expansion to the kernel with a system call to manipulate the IO permission map.

    In the first case you call your device driver and pass it the IO adress, access mode and data and it does then do the actual port read or write for you and in the second case you do a system call to that new kernel function to tell it to modify the port IO permission map for your process to allow direct access to specific IO adresses from your application process.

    Rolf Kalbermatter

  19. Hi,

    Are somewhere listed the .Net equivalents for the LabView data types.

    Personally I am facing one problem with a cluster (LabView) which exported by ApplicationBuilder as a struct

    typedef struct {

    LStrHandle aaa;

    LStrHandle bbb;

    LStrHandle ccc;

    LStrHandle ddd;

    LStrHandle eee;

    } TD2;

    I am not sure how to define the TD2 struct into .Net.

    Thank you,

    Mihai PALADE

    I'm afraid you can't. An LStrHandle is a special LabVIEW datatype and there exists no direct .Net equivalent for it. As you can see in extcode.h, it is a pointer to a pointer to an int32 followed by the actual (non-unicode) character string. As such it is not even directly a long Pascal string (although with a pointer to such a beast you could simulate it) but I doubt that .Net even would support that one.

    Rolf Kalbermatter

  20. Correct me if anything is wrong - to get the size of the structure, I have to go to the specified header file (mmsystem.h) and find the define statement for MAXPNAMELEN (that's what I mean by "get" - it is predefined). Then I have to add the size of each parameter to that and that will give me the size of the structure, which I can now feed into the function.

    So, why can't the compiler go to the header file (assuming I use an include statement) and find out the size itself and add to it the size of the other parameters? Why do I need to this manually?

    All this probably shows you that I don't have any real C experience. I have briefly learned both basic and C on my own, but never enough to do anything with it.

    A C compiler does just that. You use the sizeof() keyword for this and that will calculate the compile time size of any datatype including structures and use that value in the compiled code. LabVIEW obviously does not have C parsing capabilities so can't do anything for you with that header file.

    Rolf Kalbermatter

×
×
  • Create New...

Important Information

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