Missing CAN BUS syntax

Place where find documentation
Post Reply
User avatar
Electroguard
Posts: 836
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 268 times
Been thanked: 317 times

Missing CAN BUS syntax

Post by Electroguard »

I already have an ELM327 interface, but I was considering doing an Annex OBD2 Scanner to regain enthusiasm for publishing another project.
Basically a scanner just needs to capture and output all CAN frames without needing to decipher them.
Rather than send captured CAN frames to display on computer like arduino's do, I would prefer sending to browser if Annex can do it fast enough.

So I was looking in the Online Help for a function which might expose all the CAN frame contents for pass-through as a single entry rather than having to individually extract ID, Flags, DLC, Bytes 0 to 7, then convert them all to string, plus add a received time field, then re-combine all fields back into a delimited single string suitable to use with WORD.SETPARAM

But I notice that all CAN Help syntax is missing, even though the CAN commands and functions are recognised by the Syntax Highlighting.

And just to point out that the 1.43 Doc side comments are showing at the bottom of the Online Help.

While mentioning CAN, I've noticed a CAN.SETUP quirk which always returns 0 (OK) even without the transceiver module connected...
CANtx=26: CANrx=5: CANspeed=500: CANmode=1
ret=CAN.SETUP(CANspeed, CANtx, CANrx, CANmode)
wlog str$(ret) 'always returned 0 (OK) even without the transceiver installed
if ret>0 then wlog "Error " + str$(ret): end
User avatar
cicciocb
Site Admin
Posts: 1899
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1269 times
Contact:

Re: Missing CAN BUS syntax

Post by cicciocb »

But I notice that all CAN Help syntax is missing, even though the CAN commands and functions are recognised by the Syntax Highlighting.
Hi Robin,
do you mean the hyperlinked documentation for the CAN (when using the F2 key) ?
In this case you are right, the details for each function are missing but a complete chapter is available in the doc online [Local Link Removed for Guests]
While mentioning CAN, I've noticed a CAN.SETUP quirk which always returns 0 (OK) even without the transceiver module connected...
This function do not check for the presence of an external transceiver but just for the internal H/W.
So I was looking in the Online Help for a function which might expose all the CAN frame contents for pass-through as a single entry rather than having to individually extract ID, Flags, DLC, Bytes 0 to 7, then convert them all to string, plus add a received time field, then re-combine all fields back into a delimited single string suitable to use with WORD.SETPARAM
You should be able to read the complete frame is using IOBUFFERS in a single shot
User avatar
Electroguard
Posts: 836
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 268 times
Been thanked: 317 times

Re: Missing CAN BUS syntax

Post by Electroguard »

Hello CiccioCB, yes I did originally consider using CANBUS Buffers but couldn't see a benefit - cos numeric info cannot be sent to browser, so all the individual CAN frame numeric buffers info would need extracting then converting to string plus adding delimiters, before combining all the delimited conversions into a single string for sending to browser... therefore all numeric CAN buffer fields would need to be individually extracted anyway.

I had wondered if maybe Annex32 might have read the incoming CAN frame as a string, in which case it could have been passed straight through.
That was when I tried searching the Online Help for anything CAN related which may not have been mentioned in the CAN chapter, but then discovered all the CAN function details missing, which I thought you would want to know about.


The problem is trickier than it seems, especially as the CAN messages cannot just keep continuously scrolling off the browser screen like in the wlog window... but I have something in mind to try.
User avatar
cicciocb
Site Admin
Posts: 1899
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1269 times
Contact:

Re: Missing CAN BUS syntax

Post by cicciocb »

You could convert the iobuffer to hex and transfer to the web page. Consider that the canbus is very fast and that the transfer of all the frames at high rate will oblige to use filters.
Post Reply