Jump to content

Ryan Vallieu

Members
  • Posts

    42
  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 2018
  • Since
    2003

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ryan Vallieu's Achievements

Rookie

Rookie (2/14)

  • Conversation Starter Rare
  • Dedicated Rare
  • First Post Rare
  • Collaborator Rare
  • Reacting Well Rare

Recent Badges

0

Reputation

  1. Ok this seems to have worked but the final solution has me baffled. We built the new initramfs and added a /etc/dracut.conf.d/newsystem-dracut.conf with the space delimited list of NI modules to include. We built this list from the lsmod list of the working disk booted RHEL 7.9 system that has no problem with the HW drivers and runs the code perfectly well. Tried then doing the pxe boot with the new initramfs with those drivers as being verified as installed in the image through lsinitrd /boot/initramfs-newsystem.img When we pxe booted the system - it again failed to load the DAQmx driver. Then we looked the list of installed drivers from my OTHER disk booted system and noticed that the pxe boot initramfs image was missing ni-serial module. Went to the RHEL 7.9 system, did the yum install of niserial Went back and added that to the dracut.conf.d file - and then rebuilt the initramfs with that added and took a new rsync copy of the file system for the NFS. PXE boot again... This time the system WORKED! I will reboot PXE boot again and verify. I am very confused as to why this would work, when the original RHEL 7.9 disk boot image DOES NOT HAVE niserial module installed but the EXE works fine and can call DAQmx. But - I'll take the win.
  2. Ah - we might have missed a step and this may be the solution: https://access.redhat.com/solutions/47028 How can I ensure certain kernel modules are included in the initrd or initramfs in RHEL?
  3. Checking around on the system for failures of the pxeboot system when starting - dmesg showed: nikal module verification failed: signature and/or required key missing According to NI: NI-KAL is driver software that supports the Linux driver architecture. Edit: It actually did load according to lsmod, this must just be a warning.
  4. We are attempting to pxeboot a system based on our working RHEL 7.9 LabVIEW 2019 SP1 installation and load the system using NFS as our systems can't have hard drives for security reasons. The problem I am having now is that the NFS image version doesn't seem to be loading the NI DAQmx driver. PXIe-8135 controller LabVIEW 2019 SP1 DAQmx driver/code works great when run on the system with the HD to boot as normal. We created the NFS image that the system uses using rsync. We took everything but /proc and /sys and /home/installers (where we put package and iso images on our disconnected systems in case we need to install a package we forgot). The system boots into RHEL 7.9 GNOME, autologin and autostart work to trigger the start of our LabVIEW EXE. The issue is when my DAQmx device based code runs, it is telling me that the DAQmx driver basically has not been installed. I get error -52006 when DAQmx Create Task.vi is called. when I run nidaqmxconfig --export /tmp/ni-system when I run the system from the installed HD I get the DAQmx cards listed in Slots 6, 7, 8, and 9 When I use pxeboot running the NFS image for the file system: nidaqmxconfig --export /tmp/ni-system shows Failed Error -52006 The requested resource was not located. Any insight? Also posted over on NI.com, but so far no hits. Edit to add: Just tried this solution - Coworker used the disk-booted FSP-4 system to collect all modules reported by lsmod that started with "ni" or "Ni", and created files in the rootfs on tftpboot Server for each in the directory /etc/modules-load.d/*.conf We saw some suggestions that on systemd systems that this could work to load drivers. This did not help. Thus we had files like ni488k.conf, nikal.conf in the /etc/modules-load.d/ location - This did not work to solve the problem.
  5. Since I had time while waiting for NI to figure out why the same code called by the Embedded Runtime in Linux is not working the same as the normal LabVIEW runtime EXe - I tackled the replacement of the C code in the .SO called by the LabVIEW CLFN for the implementation of this driver. Removes the need for me to compile the code on the target, removes the extra issues of everything discussed above. Thanks for the impetus to complete that. The reads from the TCP were much easier to implement and maintain and won't lock up my code if there is an error on the server side.
  6. Characteristic Handles are just U32 types. The readString first performs a readLong to get the stringsize, then performs the read - so it looks like that would be easy to implement.
  7. I think they meant that if you read out the string into your program you are responsible for allocating the memory. the Readstring function called in the Union code does allocate memory for the pointer, but I agree that I don't see a memory deallocation when done. What I meant by the StrLen being used to allocate was using it with the Build Array and feeding that in to the MoveBlock. I will definitely bring this up with the developer that gave me the library. Moving to a LabVIEW only solution shouldn't be too difficult for the communications. Just costs time at this point.
  8. Maybe I am completely misunderstanding here....the 'v' in the case of the switch detecting the string type is just a pointer to the first element of the string in memory. The nice thing about the GetValueByPointer.vi is that you don't need to wire anything in or know the size of the string, you just wire a blank string type. When I make the call into the getValue function, which is upstream of trying to dereference the pointer it returns if the switch detects string type, I am feeding getValue the Cluster of elements, in which 'v' is a U64, as that is the widest the data can be based on the types switched into v. When valuetype is used to drive the decoding and states the data in the U64 v is a Pointer I use that pointer to read the characters. GetValueByPointer handles the memory allocation for dereferencing the string, or in the case of StrLen and MoveBlock - the StrLen is used to allocate the memory for the String. After that I am not using the original Struct in the LabVIEW code and have converted the converted data into variant so I can convert back in the calling LabVIEW code based on valueType, I am not trying to reuse the Value structure from the C call. Am I missing something? The function within getValue that gets the datatype does perform the malloc. In the case of the valuetype being charString it calls a readString() function that performs a memory allocation to hold the string.
  9. I'm dumb 😒 and was looking at the output in the wrong spot in my code when initially trying to validate the StrLen and MoveBlock output you sent. ShaunR your version is working as well as the GetValueByPointer. I am just feeding in a blank string to the GetValueByPointer to define the string type for the return and it is returning the whole string including the \00 at the end.
  10. This is the xnode code that is generated for a string. I wondered why the other system owner wanted to do things that way myself. I guess because this is the API they provide to all the other systems developers. I certainly am talking to the remote system on another process just using the TCP refnum and building the packets and interpreting the incoming message packets. Maybe I will rework this piece in the future, but it is working with including the lvimptsl.so in my support folders
  11. I'm at a loss as to why one works and one doesn't. The code I have for the source of the Union is in my first post on this topic. It seems to be a \00 terminated C string pointer. 🤷‍♂️
  12. I got the same kind of strange behavior. With the Ptr coming from the v in the junction as a U64 - the GetValueByPointer.xnode works, your example points to the wrong memory block, and does not give the same answer. I do recognize WHERE the text came from, but not what the alignment correction would need to be to get StrLen and MoveBlock to point to the correct memory location.
  13. Ahhhhh... https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019ZANSA2&l=en-GB Adding the ..\resource\lvimptsl.so to the project and then making sure to add it to the Always Included as specified in the link under a support \resource\ folder in the build directory allowed the EXE code to run properly. Of course now it is going to bug me why StrLen wasn't working correctly...
  14. I find that GetValueByPointer.vi is working (in LabVIEW Development mode) with the u64 returned in the 'v' union value treating it as a pointer, but when I try the same thing with StrLen and passing the U64 as an Unsigned Pointer - StrLen appears to be not working, returning a size of only 2 bytes, when I expect 7, and then when I feed the u64 pointer into the MoveBlock and Size 2 it isn't returning any characters.
  15. Just found that the GetValueByPointer.xnode is not working in the built EXE - works in development environment. Bah Looks like I will need to set up a CLFN for StrLen and use that with MoveBlock
×
×
  • Create New...

Important Information

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