取消
显示结果 
搜索替代 
您的意思是: 

XNET multiple sessions on one interface

已解决!
转到解答

Hello guys,

 

i'm using XNET to communicate with our CAN device. In my project i've created 3 Sessions: one Frame out session to write/send frames to the device, one Frame out session to receive the response from the device back, and another Frame In session to log all the transmitted and received frames.

 

In the frame in session i make the property option  'echo transmitted frames' to ture, so that any transmitted frames also appear as 'read' frames, and i can log every frame as i expected. Buuuuuuuut, if i do so, in another Frame In session any transmitted frames also appear as 'read' frames, although i make  the property option  'echo transmitted frames' in this session to False.  How can i just make one session to read all the transmitted and received frames, but the other not? Thx very much!

0 项奖励
1 条消息(共 3 条)
4,235 次查看
解答
接受人 mexaviesta

I don't think you can. Unfortunately some properties of a session, are actually a property of the interface.  XNet also has a internal CAN resistor you can turn on and off.  You do this using the session reference and turning it on.  Now even if you have two sessions on one interface you only have one interface, and so you only have one property for if the resistor is on, or off.  If you turn it on in one session, it will be on in the other because it shares that same interface.

 

I believe the same is true when it comes to echo.  In most CAN transceiver the echo is a feature of the transceiver and is a feature of the hardware, not software (similar to the resistor example).  So when you turn on echo for the session, you are really turning on echo for that interface, and I don't think you will be able to turn on echo for one session, but not all of them on that same interface.

2 条消息(共 3 条)
4,222 次查看

I got it! Thx very much!高兴表情

0 项奖励
3 条消息(共 3 条)
4,201 次查看