plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Etienne Robinet <erobi...@apache.org>
Subject Scraper
Date Wed, 06 May 2020 12:48:39 GMT
Hello guys,
I was looking a bit at the actual Scraper we have in 'tools'. I tested a scheduled Read via
YAML file and it worked just fine. However when I try to create a triggered-read, I get an
error:

[main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC Driver Manager
with class loader jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering available drivers...
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for Protocol s7 (Siemens
S7 (Basic))
[main] INFO org.apache.plc4x.java.transport.tcp.TcpChannelFactory - Configuring Bootstrap
with Configuration{local-rack=1, local-slot=1, remote-rack=0, remot-slot=0, pduSize=1024,
maxAmqCaller=8, maxAmqCallee=8, controllerType='null'}
[main] WARN org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.collector.TriggerCollectorImpl
- The Triggered Scraper is intended to be used with a Pooled Connection. In other situations
leaks could occur!
[main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC Driver Manager
with class loader jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering available drivers...
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for Protocol s7 (Siemens
S7 (Basic))
[main] INFO org.apache.plc4x.java.scraper.config.triggeredscraper.ScraperConfigurationTriggeredImpl
- Assuming job as triggered job because triggerConfig has been set
org.apache.plc4x.java.scraper.exception.ScraperConfigurationException: Null plc-trigger variable
used
	at org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerConfiguration.validateDataType(TriggerConfiguration.java:167)
	at org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerConfiguration.access$200(TriggerConfiguration.java:37)
	at org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerConfiguration$TriggerElement.convertCompareValue(TriggerConfiguration.java:562)
	at org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerConfiguration$TriggerElement.<init>(TriggerConfiguration.java:545)
	at org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerConfiguration.createConfiguration(TriggerConfiguration.java:386)
	at org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScrapeJobImpl.<init>(TriggeredScrapeJobImpl.java:42)
	at org.apache.plc4x.java.scraper.config.triggeredscraper.ScraperConfigurationTriggeredImpl.getJobs(ScraperConfigurationTriggeredImpl.java:99)
	at org.apache.plc4x.java.scraper.config.triggeredscraper.ScraperConfigurationTriggeredImpl.getJobs(ScraperConfigurationTriggeredImpl.java:88)
	at org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl.<init>(TriggeredScraperImpl.java:95)
	at Test.main(Test.java:27)

After some debugging it seems like the PlcField for the trigger is not set (so it's null).
Anyone who worked on this has an idea? Or maybe I'm using the config file wrong, here is what
I have:

sources:
  S7: s7://192.168.178.10

jobs:
  - name: triggered-demo-job1
    triggerConfig: (S7_TRIGGER_VAR,10,(%M200.0:BOOL)==(true))
    sources:
      - S7
    fields:
      test2: '%DB1.DBW2:INT'

Etienne

Mime
View raw message