LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FLexRay xlFrSetConfiguration() VI

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

0 Kudos
Message 1 of 14
(2,326 Views)

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;

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 2 of 14
(2,182 Views)

Try the attached control and function.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Download All
Message 3 of 14
(2,178 Views)

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

Message 4 of 14
(2,161 Views)

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!

0 Kudos
Message 5 of 14
(2,147 Views)

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???

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 6 of 14
(2,144 Views)

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.

0 Kudos
Message 7 of 14
(2,137 Views)

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.

0 Kudos
Message 8 of 14
(2,133 Views)

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

Message 9 of 14
(2,129 Views)

Hi Have you completed developing Flexray communication VIs? If so could you share ?

0 Kudos
Message 10 of 14
(1,071 Views)