Page 1 of 1

Getting back value to transmit

Posted: Wed 18. Apr 2018, 22:21
by geralde.givens
Hello to all,
I would like to make a VBscript to configure a device automatically. I succeed in transmitting few times the same frame with different value with standard macro. Now I would like to read bytes in a reception frame and put it in an emission frame. I think that is not possible with the standard macro, but it is in VBscript.

The problem is that I’m completely novice in writing VBscipt.
Below, you will find an example of the wanted function

Send 1 300h 12h 00h 00h 00h 00h 00h 00h 00h
Send 1 300h 43h 00h 00h 00h 00h 00h 00h 00h

Then I will received:
Received 1 400h 8F 01h 02h 03h 04h

Send 1 300h 13h 21h 10h 00h 00h 00h 00h 00h
Send 1 300h 21h 01h 02h 03h 04h
Send 1 300h 22h 01h 02h 03h 04h

If someone can give me the trick to do that, it would be very helpful.
Thanks a lot in advance

Regards

Re: Getting back value to transmit

Posted: Thu 19. Apr 2018, 10:01
by M.Maidhof
Hello,

please have a look on the sample macros WaitForID100() and SendMessage() which will be available in your PCAN-Explorer 5 macro list. Simply merge those two macro files together, to have an suitable VBmacro for your application.

best regards

Michael