Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Transmit.ArbitrationId

HI,
 
I try to send a fram with a configurable ID, that can be done with a CAN Network Interface Object by using : Transmit.ArbitrationId.
But I use a CAN object und i can"t find a solution to change ID ?
 
all i have is  Status = ncOpenObject("CAN1::std5", &Tx); but here the ID = 0x05 Smiley Mad, i tried itoa but it's not seem supported by the compiler (LabWindows 5.5).
 
Any suggestion
 
thank you  
0 Kudos
Message 1 of 4
(4,122 Views)

Hi,

 

Unfortunately an object is allways build for one particular ID. Thus if you like to change the ID, you have to close the Object and to initialize and open a new one.

If you have such ID changes very often i would recommend to use the Network Interface Object (Port) which allows you to use different IDs with the Read function.

DirkW

0 Kudos
Message 2 of 4
(4,110 Views)
HI again DirkW,
 
thanks for your answer, but i can't do that, I have used the CAN Network Interface do define the port1, und tow CAN Objects: Tx und Rx,
 
I dont know but can i use the same CAN network Interface to send und receive ? ( Smiley Indifferent)
 
thank you
0 Kudos
Message 3 of 4
(4,109 Views)

Hi,

Yes you can use the network Interface directly to write and read frames with different IDs.

See the attached example for more information.

DirkW

0 Kudos
Message 4 of 4
(4,092 Views)