Hello,
before using the standard schedule table to control the slaves I need to initialize all of them by sending this procedure:
Schedule_tables {
sch_mreq {
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0xFF, 0xFF, 0xFE } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x1, 0xF1, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x19 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x18 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x17 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x16 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x15 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x14 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x13 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x12 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x11 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x10 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0xF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0xE } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0xD } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0xC } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0xB } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0xA } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x9 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x8 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x7 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x6 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x5 } delay 10 ms ;
SlaveResp delay 100 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x2, 0xF1, 0x4 } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x19, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x18, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x17, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x16, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x15, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x14, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x13, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x12, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x11, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x10, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xF, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xE, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xD, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xC, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xB, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xA, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x9, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x8, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x6, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x5, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x4, 0x6, 0xB2, 0x0, 0xFF, 0x7F, 0xFF, 0xFF } delay 10 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x3, 0xF1, 0xFF } delay 10 ms ;
SlaveResp delay 1000 ms ;
FreeFormat { 0x7F, 0x6, 0xB5, 0xFF, 0x7F, 0x4, 0xF1, 0xFF } delay 10 ms ;
SlaveResp delay 1000 ms ;
FreeFormat { 0x19, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x19, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x99 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x18, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x18, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xD8 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x17, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x17, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x97 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x16, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x16, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xD6 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x15, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x15, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x55 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x14, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x14, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x14 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x13, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x13, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xD3 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x12, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x12, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x92 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x11, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x11, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x11 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x10, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x10, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x50 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xF, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0xF, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xCF } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xE, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0xE, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x8E } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xD, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0xD, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xD } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xC, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0xC, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x4C } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xB, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0xB, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x8B } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0xA, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0xA, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xCA } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x9, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x9, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x49 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x8, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x8, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x8 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x7, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x7, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x47 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x6, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x6, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x6 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x5, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x5, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0x85 } delay 300 ms ;
SlaveResp delay 200 ms ;
FreeFormat { 0x4, 0x6, 0xB1, 0xFF, 0x7F, 0x1, 0x0, 0xE2 } delay 300 ms ;
FreeFormat { 0x4, 0x6, 0xB1, 0xFF, 0x7F, 0x2, 0x0, 0xC4 } delay 300 ms ;
SlaveResp delay 200 ms ;
}
Can anybody tell me whats the best way to do that? In PLIN View Pro or Ipemotion?
thanks in advance!
br
Michael
Send ini table for slaves
Re: Send ini table for slaves
Hi,
when using the latest PLIN-View Software 3.x you could use a vbscript to handle this task. Have a look in the help->VBscipt Support for examples. Here a typical example which will also start the tracer to see the results, adapt it to your needs. It will be helpful to load a project which contains the needed config for your LIN network (using a ldf):
regards
Michael
when using the latest PLIN-View Software 3.x you could use a vbscript to handle this task. Have a look in the help->VBscipt Support for examples. Here a typical example which will also start the tracer to see the results, adapt it to your needs. It will be helpful to load a project which contains the needed config for your LIN network (using a ldf):
Code: Select all
' Enumeration PLINHardwareMode
const plinHardwareModeNone = 0
const plinHardwareModeSlave = 1
const plinHardwareModeMaster = 2
' Enumeration PLINDirection
const plinDirectionDisabled = 0
const plinDirectionPublisher = 1
const plinDirectionSubscriber = 2
const plinDirectionSubscriberAutoLength = 3
' Enumeration PLINChecksumType
const plinChecksumTypeClassic = 1
const plinChecksumTypeEnhanced = 2
const plinChecksumTypeAutomatic = 3
Dim obj
' Get or refer an instance of PLIN-View Pro
Set obj = CreateObject("Peak.Lin.ViewPro.COM.Interfaces.Application")
If Not obj Is Nothing Then
WScript.Sleep 1000
obj.OpenProject "u:\Work\Test\my_LIN.linproj", True
'Connedt to LIN Bus 1
If obj.ConnectTo(1, 1, plinHardwareModeMaster, 19200) Then
obj.StartTrace "u:\Work\Test\test_01.ltrc"
obj.Wait 100
'Wakeup
obj.SubscribeData 61, 8, plinChecksumTypeClassic
obj.Wait 100
'some normale subscriber messages
obj.SubscribeData &h22, 8, plinChecksumTypeClassic
obj.Wait 50
obj.SubscribeData &h22, 8, plinChecksumTypeClassic
obj.Wait 50
obj.SubscribeData &h22, 8, plinChecksumTypeClassic
obj.Wait 50
' Session change 0x02 programming session
obj.PublishData 60, 8, plinChecksumTypeClassic, Array(&h04, &h02, &h10, &h02, &hFF, &hFF, &hFF, &hFF)
obj.Wait 10
obj.SubscribeData 61, 8, plinChecksumTypeClassic
obj.Wait 10
' tester present
obj.PublishData 60, 8, plinChecksumTypeClassic, Array(&h04, &h02, &h3E, &h00, &hFF, &hFF, &hFF, &hFF)
obj.Wait 10
obj.SubscribeData 61, 8, plinChecksumTypeClassic
obj.Wait 10
obj.PublishData 60, 8, plinChecksumTypeClassic, Array(&h04, &h03, &h22, &hFD, &h01, &hFF, &hFF, &hFF)
obj.Wait 10
'Get Data 0x3D from Slave
obj.SubscribeData 61, 8, plinChecksumTypeClassic
obj.Wait 10
obj.Wait 1000
obj.StopTrace
End If 'End ConnectTo
' Finally you can call obj.Close
'obj.Close True
End If
regards
Michael
-
- Posts: 2
- Joined: Fri 3. Feb 2023, 14:17
Re: Send ini table for slaves
Danke!
Werde ich ausprobieren!
Noch eine Frage, macht Peak das PCAN-UISB Pro LIN Plugin für Ipemotion oder kommt das von Ipetronik.
Ich verstehe nicht wie das Plugin die schedule tables handelt...
danke
Grüße
Michi
Werde ich ausprobieren!
Noch eine Frage, macht Peak das PCAN-UISB Pro LIN Plugin für Ipemotion oder kommt das von Ipetronik.
Ich verstehe nicht wie das Plugin die schedule tables handelt...
danke
Grüße
Michi
Re: Send ini table for slaves
Hallo,
das LIN Plugin machen wir nicht, wir stellen nur Hardware, Treiber und API zur Verfuegung.
Gruss
Michael Maidhof
das LIN Plugin machen wir nicht, wir stellen nur Hardware, Treiber und API zur Verfuegung.
Gruss
Michael Maidhof