I am trying to create a python script to send some CAN messages using the PCANBasic Api. For example, say i want to send 35 messages. I've been searching this forum, and I think i've read it's not possible to have more than 1 instance of the CAN_BUS using this API at the same time. I need to both write and read in the same program. Is this possible?
Like this: send msg -> wait for response -> message received! go on to next msg -> send msg ...
I assume you mean a CAN hardware channel by "CAN_BUS", in which case this statement is the complete opposite of what actually is the case, let me clearify:
A PCANBasic application cannot access a CAN-Channel used by another application.
A PCANBasic application can use up to 16 channels per hardware-type.
Have you checked out our PCANBasic example application?
Sending and reading from the same application is not an issue at all.
You may wanna start looking at the example-application and take a look at the examples given in the PCANBasic documentation:
https://www.peak-system.com/fileadmin/m ... -basic.zip