Jump to content

Ryan Vallieu

Members
  • Posts

    27
  • 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

Newbie

Newbie (1/14)

0

Reputation

  1. Using the valueLabel and then either TypeCast or GetValueByPointer.xnode to convert from string is working. Thanks for the insight and the gained knowledge.
  2. Well I have the basic union code isolated and the LabVIEW wrapper seems to work to call into the function. Thanks guys!
  3. That info about Long on Linux being 64-bit cleared up a bunch of issues around the other function calls provided to me. The old system being interfaced is a Solaris system returning 32-bit Long information and the sendLong function called out on the PXIe CentOS system was sending out 64-bit Long types to the Solaris system, so all the messages had 32 extra bits of information. I've made the owner of the API aware of the issue that Long is not guaranteed to be 32-bit on a system so the API must be reworked.
  4. Thanks Rolf! I am on CentOS 7.6 64-bit on a PXIe-8135. Got side tracked, gonna make a test code that feeds constants through that data structure and wrap that so I can know what to expect for data. Thanks, giving that a go this morning.
  5. valueLabel is a typedef enum typedef enum { noValue = 0, InstrumentServiceName, NetworkPortNumber, ComponentID, ScanRate, Slot, NumChannels, ChannelNumber, CardNumber, FirstChannelNum, IEEE488_Address, VXI_Address, SerialNumber, SensorID, ScanListItem, Gain, Filter, Excitation, Cluster, Rack, PCUtype, EUtype, RefType, PCUpressure, MaxPressure, AcqMode, CalTolerance, CalPressure1, CalPressure2, CalPressure3, CalPressure4, CalPressure5, DataFormat, ThermoSensorType, ThermoSensorSubType, SensorType, MaxValue, SwitchState, OrderForAction, RcalFlag, CalDelayTime, CalShuttleDelayTime, nfr, frd, msd, MeasSetsPerSec, ServerName, RefPCUCRS, CalMode, ZeroEnable, NullEnable, ZeroMode, RezeroDelay, SensorSubType, ModuleType, ModuleMode, MeasSetsPerTempSet, CardType, Threshold, ControlInitState, ControlPolarity, StateEntryLogicType, StateEntryDelay, StateExitLogicType, StateExitDelay, TriggerType, TriggerEdge, ScansPerRDB, InterruptLevel, CSR_Address, Program_Address, ScannerRange, Hostname, ConnectVersion, From, To, ShuntValue, ValveConfig, NextToLastLabel, lastLabel, EndOfValList = 9999 } valueLabel; and valueType is also defined as an Enum typedef enum { noValueType = 0, integer = 1, floating = 2, charString = 3, uLong = 4, maxValueType, EndOfValTypeList = 9999 } valueType;
  6. I have code from another developer that allows me to interface with a server to get configuration data. I have compiled the C code into a .SO on my Linux system without error - but in writing my LabVIEW CLFN, I am unsure what to do with a Union Pointer to pass the data. The function in the C file: void getValue(int so, CharacteristicHandle ch, Value *v) { long longValue; unsigned long ulongValue; double doubleValue; char * c_ptr = 0; long msgType = g_val; sendLong( so, msgType ); sendCHARhandle( so, ch ); readLong( so, &longValue ); v->order = longValue; readLong( so, &longValue ); v->type = longValue; readLong( so, &longValue ); v->label = longValue; switch( v->type ) { case integer: { readLong( so, &longValue ); v->v.l = longValue; break; } case uLong: { readLong( so, &ulongValue ); v->v.ul = ulongValue; break; } case floating: { readDouble( so, &doubleValue ); v->v.d = doubleValue; break; } case charString: { readString( so, &c_ptr ); v->v.s = c_ptr; break; } } return; } The definition of "Value" from another header file: /* Define a type to hold the value and type information for * a characteristic. */ typedef struct Value { union /* This holds the value. */ { long l; unsigned long ul; double d; char *s; /* If a string user is responsible for * allocating memory. */ } v; long order; valueType type; /* Int,float, or string */ valueLabel label; /* Description of characteristic -- what is it? */ } Value; I'm a newb at CLFN - the primitive datatypes I've got working for my other calls - this one I am not sure how to configure with the CLFN. Is this possible to do with the CLFN?
  7. Solution: Since we need xinetd to be able to open N number of LabVIEW VIs as this is how the legacy system is configured and the "institution" doesn't want to change that at this point, I had to figure out how to make this work. Compiled my test VI into a .SO Shared Object library on my PXIe-8135 running Cent OS 7.6. Selected Advanced options in Build to use EMBEDDED version of run-time engine - doesn't require a GUI for the code to run. Wrote simple c code to launch the LabVIEW VI. Installed and configured xinetd to launch C code that launches LabVIEW code. Used the package: xinetd-2.3.15-14.el7.x86_64.rpm LabVIEW Test VI uses LabVIEW Linux Pipe VIs with hard coded 0 (STDIN) and 1 (STDOUT) to communicate over the socket. As explained basically here: http://www.troubleshooters.com/codecorn/sockets/ Result is that the LabVIEW code runs and can communicate over the Socket connection through the Pipe VIs. It turned out to be easier on the LabVIEW side than I expected. Hard coding the 0 and 1 into the Read from Pipe.vi and Write to Pipe.vi worked.
  8. This has since changed. I am now compiling my LabVIEW code into .SO library and calling that from C as apparently I can only get xinetd to launch one instance of LabVIEW, the system must be set to run-at start-up, etc. etc. I can call any number of LabVIEW VIs from .SO through a C call and have them happily chugging away in their own app spaces. What I am missing still is how to get the STDIN/STDOUT through to the LabVIEW program. I suspect if I was better at C this would be easy (easier?). Just trying out a simple demo at first so the LabVIEW code doesn't need to be a full-blown architecture. I just need to get that damn "pipe" or File Descriptor.
  9. I've got a need for ONC-RPC from LabVIEW running on a Linux system. Looks like that library link is dead that you posted. I will try to dig around to see if it just moved. Does anyone know of existing toolkits? I'd look at VIPM, but my main laptop died and is being fixed and I am not allowed to install any software on this loaner PC.
  10. I am trying to figure out how to get LabVIEW EXE running on NI Linux RT for PXI 2019 to communicate over System.in and System.out when it is called by xinetd so that the Client that connected can communicate to the LabVIEW exe. I don't have the Pipes VIs on the palette on the RT VI functions palette. Maybe LabVIEW RT doesn't realize it is running on Linux. Is there a simple way to accomplish this that I just don't know about from my limited Linux experience?
  11. I know this is an old topic, but I am trying to figure out how to get the Pipes VIs in LV 2019 for LabVIEW running on NI LabVIEW Linut RT for PXI. The pipes VIs are not on the Connectivity/Library in the RT palettes for the PXI Linux RT system. I wonder if it has to be Linux "Desktop" installation of LabVIEW for those VIs to show up on the palette and how we could get them on Linux RT for PXI? Hmm.
  12. Hmm the link to the NI page no longer works, that stinks.
  13. Anyone have an 8 GB memory chip in their PXIe-8840QC? If you do can you let me know the part number? I'm working on netboot and need to increase my RAM from the 4GB included. Yes, I know NI sells NI part number 783001-8192, but I am expecting a ridiculously high quote for something that should only cost $200 maximum in the worst case. I'm thinking Micron MT16KTF1G64HZ-1G9P1, Memory Module DDR3L SDRAM 8GB 1866MT/s 204-SODIMM would work, just rather know if someone has an 8GB memory that is known working. What's in it from NI is the 4GB Micron MT8KTF51264HZ-1G9P1 (PC3L-14900S-13-13-B4, 4 GB 1Rx8 ), Memory Module DDR3L SDRAM 4GB 1866MT/s 204-SODIMM
  14. Well I was playnig around with PXE boot and the PXIe controller and got the system to PXE boot with tftp and using the kernel bzImage and initramfs files from /boot/.safe - but that is only the safemode boot image. But it worked properly and demonstrated to me that if things are done correctly I should be able to PXE boot. Checking the LVRT repo on Github, I noted it mentioned building the kernel and installing in the folder location /boot/runmode <- in this folder I found the runmode kernel bzImage file and runmode initramfs Trying to use those files for the PXE boot, the kernel loads, but there is an error with the initramfs loading.
×
×
  • Create New...

Important Information

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