Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
-
lamel17
- Posts: 3
- Joined: Wed 22. Mar 2017, 03:21
Post
by lamel17 » Wed 29. Mar 2017, 10:23
Hi
I made a standard macro as below. I will have to execute it when I arrive in field. I don't have any device to test it before going to business trip. So, I want to debug my script and want to know how to execute it when my PC is connected to the engine controller.
Could you guide me?
Code: Select all
// PCAN-Explorer Macro File
// First edited: 3/27/2017 2:43:52 PM
FormatVersion=5.0
ClearQueue
StartTrace
Send 1 1887FE02h 8 0Dh 04h 00h FFh FAh 03h 00h 00h //send ESC = "fueling desired"
wait 1000
Monitor : WaitData 0 1 18FCC800h 8 ****01**b **h **h **h **h **h **h **h //monitor EEC13
If True
Goto StopRequest
Send //send ESC = "fueling desired"
wait 1000
Goto Monitor
StopRequest : PrintToOutputWindow "Engine is Capable"
Send 1 1887FE02h 8 0Ch 04h 00h FFh 00h 03h 04 00hh //send ESC to request engine to be stoppped
Send // send ENGSC
Wait 3000
WaitData 1 18F00400h 8 **h **h **h 00h 00h **h **h **h//monitor engine speed =0
If True
Goto RestartRequest
Goto StopRequest
RestartRequest : PrintToOutputWindow "Engine is Stopped"
Wait 15000
send 1 1887FE02h 8 0Dh 04h 00h FFh FAh 03h 00h 00h // send ESC
send 1 10F0ED02h 8 EEh FCh 00h 00h 00h 00h 00h 00h// send ENGSC
WaitData 1 18F00400h 8 **h **h **h 00h 00h **h **h **h // monitor engine speed=0
If False
Goto Finalize
Goto RestartRequest
Finalize : PrintToOutputWindow "Engine is Restarted"
StopTrace
Stop
-
PEAK-Support
- Sales & Support

- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Post
by PEAK-Support » Wed 29. Mar 2017, 15:23
Debuging a STD Macro is not possible - you could print out Info to the Output Window (old shool debuging)
Code: Select all
PrintToOutputWindow "Datenübertragung..."
If you want to test your macro without a real HW, start a second instance of the PCAN-Explorer, connect both to the same virtuell Net and simulate with the second PE5 the node you miss.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
lamel17
- Posts: 3
- Joined: Wed 22. Mar 2017, 03:21
Post
by lamel17 » Thu 30. Mar 2017, 03:31
Thanks for reply.
Sorry, I'm a beginner, almost infant in this field. I'm trying to add virtual net. I've been looking for how to do it in "help" and this forum, but I still don't get it.
I can see only "USB" section when I open "add connection". I attached the screenshot.

- Capture.JPG (29.64 KiB) Viewed 5228 times
I followed the instruction below, it didn't work.
- start the Regedit.exe
- goto this KEY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Pcan_usb
- change the Start value from 3 (Load on demand) to 2 (Auto load)
Could you guide me how to add virtual net here?
Thanks!
-
PEAK-Support
- Sales & Support

- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Post
by PEAK-Support » Mon 3. Apr 2017, 11:39
The Device Driver is only loaded if the Device is plugged in. If you remove the CAN-USB Device, the driver will be unloaded. You could change that by edit in the registry the driver load param (Windows feature - not a PEAK-System feature).
But we recommend to use a real "Virtuall Device Driver" which is part of the Standard Driver Setup:

- virtuelldriver.JPG (37.06 KiB) Viewed 5215 times
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------