Jump to content

Rolf Kalbermatter

Members
  • Posts

    3,892
  • Joined

  • Last visited

  • Days Won

    267

Everything posted by Rolf Kalbermatter

  1. It would seem you have run into a big problem here. The only instance that knows about the IP address mapping of a dynamically assigned IP adress is the DHCP server that issued that address. The way this is usually solved is, that the specific client is known under a DNS name that it provides to the DHCP server when asking for an IP address. The DHCP server then will inform the DNS server about this new address. Since this seems no option in your case there are only very few other feasible and sure to work things: 1) adding some address recovery support to the devices yourself. Basically this would be some UDP broadcast message that your devices reacts too. The device will expect a specifically formatted packet on a well defined port. The package could contain a specific MAC address or a place holder to let all devices that receive it respond with a packet that contains the MAC address and the current IP address. This is obviously something most device manufacturers do not make public but since you are to test devices that your company manufacturers this should not be the problem. Since UDP braodcasts are usually not routed, you can get in trouble with this in a setup with multiple IP subnets and would need to use TCP instead but that does not have an universal broadcast mechanisme like UDP. 2) Another solution is to simply add some remote IP update mechanisme. Things I have seen are for instance where the device will react on a specific size ping message to update its own IP address with whatever address that ping contains. This may seem a bit useless since you usually simply specify the IP address in the ping command. But this works in such a way that you first manipulate the local arp table in your computer. You can do that with the arp command line program (or calling into low level Windows network APIs, but this solution is very cumbersome). First you make sure to delete any reference to the desired MAC address from the arp tables. Then you add a new arp entry with the specific MAC address and the desired IP address. When you now issue the ping command to that IP address (using the data packet load size your device is setup to recognize as the magic change my IP command), the device receives that ping packet and changes its internal IP address to whatever IP address the IP header of the ping packet contains. This obviously will only work in the local subnet since the arp tables are not used when contacting a device in a different subnet but instead that request is passed on to the subnet gateaway. Another theoretical solution would be maybe the use of InARP which is the Inverse ARP protocol. How to set that up and make it work I do however not know. Rolf Kalbermatter
  2. I noticed quite a few posts in the LAVA 1.0 board that were originally made by Ton Plomp but now have LAVA 1.0 as author. I would expect something like this to have happened to Ben too. I'm not sure if I "lost" any posts. I do not keep a close tag on them . Rolf Kalbermatter
  3. Actually there is quite likely some reason. I do see that it seems not just .Net is getting involved but also COM. And from my workings with COM to interface to WIA I have encountered various strange things that seem to relate to the fact that the COM interfaces get sometimes into trouble to marshal its calls between LabVIEW and the out of process target component. I could trigger this very reliably when debugging C calls into those COM methods when the Call Library Node was setup to be reentrant and as soon as the Visual C debugger kicked in. It could vary between COM methods failing with some marshalling errors and a complete lockup of LabVIEW and the debugger. The solution for me was to set all Call Library Nodes to be non reentrant during debugging and set them back to reentrant for the final library. Setting all calls to be non-reentrant did not entirely fix this, but it made it possible to run at least far enough to debug the issues at hand. There were still some COM methods that sometimes (not always) failed with some marshalling errors. I could imagine that the execution context in which QuickDrop is running might have some issues to run .Net and ActiveX methods reliably due to some synchronisation issues. Especially the marshalling of COM data is always driven by the message pump of the calling application and that is one really hairy part in LabVIEW to deal with. I'm glad I never will have to work on that code. Rolf Kalbermatter
  4. So the real solution would then be to add an endianess selector to the Typecast? Running and hiding! Rolf Kalbermatter
  5. Yes I meant for sure Full Duplex and the USB Bus is able to do that. So if you have an USB to RS-485 interface with 4 wire output (I think it is an oxymoron since RS-485 usually implies 4 wire connection), then there should be no problem in having real Full Duplex operation. The converter will need a little intelligence and buffer to store packets as they are transmitted over the USB bus back and forth, but for the normal observer it will look like real Full Duplex. Bi directional as you seem to define it here makes of course little sense in such a setup. Rolf Kalbermatter
  6. You have the hardware and hopefully the documentation, so you are about 2 light years ahead of us, to make this work! Sorry but with so little information it is absolutely impossible to help you and I doubt there is anyone else with this hardware setup, who is reading this board AND has tried to make this work in LabVIEW AND is willing, able and has time to share his solution. So you will have to try harder to make this work. Rolf Kalbermatter
  7. Well, for that you have 4-wire on the RS-485 side, and while real bidirectional transfer over the USB bus is obviously not possible, the USB bus should, with the right driver, be fast enough to give to the system the impression that it is indeed bidirectional. I haven't used bidirectional communication where the timing was so critical that quasi-bidirectional operation would have caused trouble. IMHO such a system could never work unless all involved parties are 100% real 4 wire devices and their firmware is exactly the same. But that would be highly useless, unless you want to create a protected, private, proprietary communication network. Rolf Kalbermatter
  8. While this are all nice to have things, it is not such a big problem to structure your local caching in such a way that you can minimize possible dataloss, when your system decides "to go out for lunch". It's definitly not even close to the time you would have to spend to port SQLlite into a proven, reliable RT solution for your target. Of course this assumes that you would do the porting . Hoping someone else will do it because of the nice technical challenge this provides would require less time on your part but has a very good change to happen somewhere between now and the end of all worlds . It would be different if such a solution would be possible to be commercialized but I see little chances for that. Well when I talk about an SQL engine I also consider a direct DLL implementation as such. For me it is not the fact of a deamon like implementation that qualifies as engine but the implementation itself. And I agree deamons are in general not a very good idea on an RT system, unless you know exactly what they do and how they could interact with your system in the worst case. Rolf Kalbermatter
  9. Unfortunately this only returns NULL as serial number on my XP SP3 system, independent of the log in I use. And I have tinkered quite a bit with IOCTL_STORAGE_QUERY_PROPERTY myself but it just doesn't seem to work on my machine and with that harddrive, except when using directly SMART, but for that I need to open Physicaldrive0 with READ and WRITE access and that fails without admin rights. Rolf Kalbermatter
  10. I haven't played with the BIOS serial numbers yet. I did some tests with my OpenG port IO functions to read directly the physical memory to get to the BIOS information. But this requires a kernel driver that you can only install with admin rights (and elevated admin rights in Vista and higher) and most likely loading that kernel driver is also a Windows privileged operation, just as opening the PhysicalDrive. I was able to read various BIOS information in that way and the BIOS serial number was also part of it, but I was of course logged in as admin. Rolf Kalbermatter
  11. Not exactly sure what you mean, but it should be fairly easy to modify those VIs to actually download a binary stream after they get the initial html header. Rolf Kalbermatter
  12. Well I once was fairly fluent in vi commands but if I sometimes happen to get in that mode nowadays, I look pretty silly. Talk about a non intuitive edit flow! Rolf Kalbermatter
  13. Actually I was thinking the same, but in the case of loading a .Net assembly in the LabVEIW development environment 8.0 or higher, it should in fact use the project directory rather than the LabVIEW executable directory, according to some posts by Brian Tyler, the principal architect of the LabVIEW .Net interface and at that time THE NI .Net specialist, before he went to MS. But I have to admit I never tested that thoroughly. My only .Net exposure so far was really the development of a binary .Net interface module for LuaVIEW that had mainly to run under LuaVIEW and LabVIEW 7.1. Rolf Kalbermatter
  14. You can actually do that with the Windows Message Queue example on the NI side. Since it normally hooks the VI window there are events that it never will see, but hooking the application window should be possible too, albeit a bit more troublesome. (and if you mess up that hook you can hose LabVIEW pretty badly , as I know from various projects where I went that path). Rolf Kalbermatter
  15. Just a few remarks here, although I'm not a .Net Guru at all. I'm not sure if app domain is the right word here but LabVIEW indeed registers the project directory for private assemblies. .Net basically only allows two locations for .Net assemblies and that are the GAC and the private assembly directory, which MS might call app domain. Obviously there is no project directory in a LabVIEW executable and therefore the executable uses the default .Net private assembly directory which is the executable directory itself. One additional complication is that you can only add strongly named (fully versioned and all) assemblies to the GAC. Supposedly, all these restrictions are to avoid DLL hell. The problem here might be really that the .Net reference stores the relative path from the project to the assembly, which would explain the mess you get on different computers causing recompiles all the time. Rolf Kalbermatter
  16. I'm probably missing the point in this. What do electrons on the pavement have to do with a proper bidirectional USB protocol? Rolf Kalbermatter
  17. The problem of this setup as it seems to me is that the data resides on the RT system. This has a number of limitations: 1) How do you backup that? No IT provided backup scheme is going to plug into your RT system easily to have that data backed up automatically. 2) How do you access the data? The data may be stored by the RT system but usually the results are not interesting to the RT system anymore but instead to your test department, calibration services, production management, etc. Accessing the data on your RT system by them will require them to use custom made tools by you to retrieve that data and copy it into a more normal database so they can perform their queries, and data mining tasks on them. 3) Assuming you do not need this data external to the RT system, why would you need a relational database at all? That are the fundamental problems of this question. There are also technical ones and building the SQLLite into a shared library that can run on those systems is probably not the biggest of them. More interesting to me would be the stress on the system caused by such a DB engine continuously running in the background, how long the various storage media (some are still pretty simple flash media) will last with a DB engine continuously reading and writing to it, etc. Also assuming you want to do some really usefull stuff with that DB on the RT system, there is a lot more than just making the C code compile, link and run on the RT system. Making sure the resulting engine will really do the right thing independent of all the specialties and constrains of an RT system such as for instance endianess (yes the VxWorks RT targets are all PPC based and use big endian where as all the rest of LabVIEW nowadays uses x86 with little endian), will be likely a lot more work than to get the C code compile and run would be. You do not want to trust your vital data to a DB engine that will eventually crunch your data to an unrecognizable mess on some border condition. All these are things that would need to be investigated very thoroughly before you start to spend many days of working power to port the C sources to compile and run properly on an RT system. Can you explain to me your use case for an embedded relational database more clearly? I would like to understand that issue. For what I have used DBs so far, it was either data logging (historical DB) or managing test results (where a relational DB may come in handy) but those data are typically needed by people that have no direct access to the RT system and so storing it in a network database is a much more sane approach. So what I usually do for test data, is to store the data locally in a buffer and cache it regularly in a simple binary file format. This data then gets regularly transferred to the host application and from there stored in a network database using an ODBC connection. Rolf Kalbermatter
  18. Walking the registry, while not necessarily to bad, is still a bit of work and doing that regularly to detect addition or removal of drives seems a bit expensive to me. And the registry unfortunately doesn't help in my case either. The serial number is not in there!!! Damn I know that feeling!! Rolf Kalbermatter
  19. I would agree with the previous two post. Full Duplex support is important for industrial applications but with a little onchip buffer this should be doable. Also the termination debugging is a good feature. Are there internal termination resistors and are they possible to be disabled? What about bias resistors? The 5V power output on the port would be nice. Doesn't have to be high power, just a few mA in order to add some bias resistors to the setup on the other side. Rolf Kalbermatter
  20. Good work. A very nice library. Rolf Kalbermatter
  21. I see you are using the IOCTL_STORAGE_DISK ioctl codes now. Unfortunately that seems not to work for some (all?) SATA drives, at least on my computer the serial number field always remains empty using that method. This seems to be a known issue with the STORAGE class device driver API not returning the serial number for SATA drives. In short all my research has not brought any reliable method to return the serial number both without admin rights and for all types of built in drives. Don't even talk about USB connected drives, they return the model number devided up in vendor ID and ProductID, which have a meaningful meaning for USB sticks, but divide the ModelID into two parts for USB connected HDs and never return any serial number. Maybe they improved the storage device driver API in Win7 to also return the serial number but at least on XP it will not work for SATA drives. Rolf Kalbermatter
  22. Must have been an Info-LabVIEW post then and not as detailed and about all these things. Many things described in the previous answer were not even possible with LabVIEW 4 or so, which was the then most current version. Also at that time while I was busy trying to write the occasional CIN, I was also often flabbergasted at how to match C and LabVIEW well. Would it be a post explaining about the Windows SDK datatypes and how they relate to LabVIEW datatypes? That could be from around that time. Rolf Kalbermatter
  23. I would quess that the codecs and the entire h323 setup on the Linux machine was probably all in C, with no LabVIEW involved in that part. Maybe it was compiled as shared library and accessed over the Call Library Node, or it could have been its own process and communicate over some TCP/IP protocol with the LabVIEW test application. I have been looking into the possibilities of supporting SIP based VOIP through LabVIEW and came across the sipXtapi libraries, but that went never into a stage where real programming work was done (and it would require some serious DLL wrapper written in C to interface it to LabVIEW). Rolf Kalbermatter
  24. I had a Dell Latitude C 620 or so, then a VAIO and now a Dell Latitude D 830. They all worked well for a long time, with almost daily full time use, and with the Vaio having some issues with certain software drivers. The first Dell's display stopped working after almost 3 years, just a the end of our 3 year onsite support we got with it, and Dell responded promptly replacing first the display, which didn't help, and the next day the system board, which helped because apparently the power converter on there was bad. I did however specifically choose Latitudes eventhough they are more expensive than the other Dell series, because they did look and feel more robust and reliable. Still happy with my D 830 but I recently looked at the newer E Latitude series and it seems the user ratings are rather spread from very enthusiastic to simply abdominal quality. Rolf Kalbermatter
  25. Because I hadn't looked closer at it at that point. Because my solution didn't work properly at that time. I had in the past tried to make modifications to get around the admins-right limitation and the whole thing was not compiling at all. And the older version I had running did not have the MACaddress and HD Serial option. I got it back running with the admins right limitation in the mean time, after looking at your DLL and recognizing the IOCTL operations, but circumventing the admins problem is tricky to solve for all HDs and supposedly going to fail in Vista/Windows 7 again, so not a very high priority for me to get this done. Yes I'm also not saying that a DLL needs to be miniscule. But I like to see what is possible and find it interesting to try to not get unneccessary stuff linked in my DLLs. One possibility for this is to still use VC 6. Not because it creates compacter code than VC 2008 (it most probably does a worse job than 2008) but because it's runtime is also much smaller and can without any trouble be selected to be dynamically linked. For Borland C, Delphi and VC 2008, you probably have to include the C runtime in the link to make sure that you do not need to distribute an additional runtime library installer. Rolf Kalbermatter
×
×
  • Create New...

Important Information

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