Because Clojure is a JVM language, oa4j can be used to connect to WinCC Open Architecture.
(def manager (new JManager)) (defn callback [values] (let [v (reduce #(+ %1 %2) (map #(.getValueObject %) values))]; (dpSet :ExampleDP_Trend1. v))) (defn -main [& args] (.init manager (into-array args)) (.start manager) (dpSet {:ExampleDP_Arg1. 2.0 :ExampleDP_Arg2. 3.0}) (println (clojure.string/join "," (dpGet [:ExampleDP_Arg1. :ExampleDP_Arg2.]))) (let [c (dpConnect [:ExampleDP_Arg1. :ExampleDP_Arg2.] callback)] (Thread/sleep 180000) (.disconnect c)) (.stop manager))
Full example can be found here.