12-18-2018 08:33 AM
I am using the VIs in the Vector XL LV2011_V2.zip on the link https://forums.ni.com/t5/Example-Program-Drafts/Vector-XL-Driver-LabVIEW-wrappers/ta-p/3524976/page/... to set Flexray communcation .However,among the Vis included,there's no xlFrSetConfiguration() VI(I have tried to create it myself but it requires to be passed a structure of inputs to it that i am not sure how to do).Is there a walk around for this VI that is already included among the Vis?Because I understand it's important for channel setup.Thank you
01-29-2019 06:11 PM
You can find the structure that needs to be passed (XLfrClusterConfig) in the vxlapi.h file.
typedef struct s_xl_fr_cluster_configuration { unsigned int busGuardianEnable; unsigned int baudrate; unsigned int busGuardianTick; unsigned int externalClockCorrectionMode; unsigned int gColdStartAttempts; unsigned int gListenNoise; unsigned int gMacroPerCycle; unsigned int gMaxWithoutClockCorrectionFatal; unsigned int gMaxWithoutClockCorrectionPassive; unsigned int gNetworkManagementVectorLength; unsigned int gNumberOfMinislots; unsigned int gNumberOfStaticSlots; unsigned int gOffsetCorrectionStart; unsigned int gPayloadLengthStatic; unsigned int gSyncNodeMax; unsigned int gdActionPointOffset; unsigned int gdDynamicSlotIdlePhase; unsigned int gdMacrotick; unsigned int gdMinislot; unsigned int gdMiniSlotActionPointOffset; unsigned int gdNIT; unsigned int gdStaticSlot; unsigned int gdSymbolWindow; unsigned int gdTSSTransmitter; unsigned int gdWakeupSymbolRxIdle; unsigned int gdWakeupSymbolRxLow; unsigned int gdWakeupSymbolRxWindow; unsigned int gdWakeupSymbolTxIdle; unsigned int gdWakeupSymbolTxLow; unsigned int pAllowHaltDueToClock; unsigned int pAllowPassiveToActive; unsigned int pChannels; unsigned int pClusterDriftDamping; unsigned int pDecodingCorrection; unsigned int pDelayCompensationA; unsigned int pDelayCompensationB; unsigned int pExternOffsetCorrection; unsigned int pExternRateCorrection; unsigned int pKeySlotUsedForStartup; unsigned int pKeySlotUsedForSync; unsigned int pLatestTx; unsigned int pMacroInitialOffsetA; unsigned int pMacroInitialOffsetB; unsigned int pMaxPayloadLengthDynamic; unsigned int pMicroInitialOffsetA; unsigned int pMicroInitialOffsetB; unsigned int pMicroPerCycle; unsigned int pMicroPerMacroNom; unsigned int pOffsetCorrectionOut; unsigned int pRateCorrectionOut; unsigned int pSamplesPerMicrotick; unsigned int pSingleSlotEnabled; unsigned int pWakeupChannel; unsigned int pWakeupPattern; unsigned int pdAcceptedStartupRange; unsigned int pdListenTimeout; unsigned int pdMaxDrift; unsigned int pdMicrotick; unsigned int gdCASRxLowMax; unsigned int gChannels; unsigned int vExternOffsetControl; unsigned int vExternRateControl; unsigned int pChannelsMTS; unsigned int framePresetData; //!< 16-bit value with data for pre-initializing the Flexray payload data words unsigned int reserved[15]; } XLfrClusterConfig;
01-29-2019 07:15 PM - edited 01-29-2019 07:21 PM
Try the attached control and function.
01-30-2019 02:52 AM
Thank you TroyK for your response..I figured out how to create xlFrSetConfiguration() yesterday thanks to you.I read the information you wrote on the link https://forums.ni.com/t5/Example-Program-Drafts/Vector-XL-Driver-LabVIEW-wrappers/ta-p/3524976 because i realised you had created the VIs by making modifications to vxlapi.h.and the used the import shared library wizard of labview.Now I am trying to do the same for all the other remaining functions..Thank you
02-05-2019 12:17 PM
Hello TroyK,I hope you are fine.I am having hard time creating the xlFrInitStartupAndSync().it is different from the other functions because i have to pass a structure in it and in that structure there're pointers to other structures.Please help me!
02-05-2019 03:58 PM
I don't use FlexRay so I have no good reason to use up my time to write functions for someone else to use.
What have you tried so far? Attach the VI. What happens when you run it?
What have you read so far to get the information you need?
LabVIEW CLFN structure passing???
vxlapi FlexRay datatypes???
02-06-2019 03:15 AM
Hello,TroyK.Sorry it was the end of the day and I was tired and disperate .I have attached my VI.What happens is when I pass the port handle to this VI,I get xl_ERR_INVALID_PORT.When I pass the port handle to other VIs I don't get this error. This makes me think there's something wrong with my xlfrInitStartAndSync.vi. I created this VI by modifying the vxlap.h file and then using the import shared library tool.Thank you for your time.
02-06-2019 05:13 AM
I have updated my VI because i was passing the porthandle as a pointer but it's supposed to be passed as value. Now I am getting a new error: vector xl driver error 271.Here is the updated VI.
02-06-2019 09:34 AM
I have resolved my problem.the vi i just posted before works but the 271 error was coming from a wiring problem in a previous VI such that the input parameters were being wrongly passed to it
02-23-2021 09:07 PM
Hi Have you completed developing Flexray communication VIs? If so could you share ?