I have Duet3 3HC expansion boards with my 6 Vacuum Sensors ( SMC NPN Vacuum Pressure Digital Sensors -ZSE30A-01-C-L (Not Z-Probe)) . Below is part of my config.g on my Duet3 6XD controller
; Sensors outputs ===> Duet3 inputs
; SMC NPN Vacuum Pressure Digital Sensors -ZSE30A-01-C-L (Not Z-Probe) - Model: ZSE30A-01-C-L has 2 Outputs OUT1 = 1 NPN output , OUT2 = 1 Analog Output (1 ~ 5V)
; Analog Signal Outputs (White wire (output 2) for reading Analog vacuum sensing and pressure values).
M308 S0 P"2.io0.in" Y"linear-analog" A"VG1 Pressure" F0 B37 C-130 ; Duet 3 3HC CAN_ID 2 Port 0- Analog capable - Vacuum Sensor Nozzle 1
M308 S1 P"2.io1.in" Y"linear-analog" A"VG2 Pressure" F0 B35 C-130 ; Duet 3 3HC CAN_ID 2 Port 1- Analog capable - Vacuum Sensor Nozzle 2
M308 S2 P"2.io2.in" Y"linear-analog" A"VG3 Pressure" F0 B37 C-130 ; Duet 3 3HC CAN_ID 2 Port 2- Analog capable - Vacuum Sensor Nozzle 3
M308 S3 P"3.io0.in" Y"linear-analog" A"VG4 Pressure" F0 B35 C-130 ; Duet 3 3HC CAN_ID 3 Port 0- Analog capable - Vacuum Sensor Nozzle 4
M308 S4 P"3.io1.in" Y"linear-analog" A"VG5 Pressure" F0 B35 C-130 ; Duet 3 3HC CAN_ID 3 Port 1- Analog capable - Vacuum Sensor Nozzle 5
M308 S5 P"3.io2.in" Y"linear-analog" A"VG6 Pressure" F0 B35 C-130 ; Duet 3 3HC CAN_ID 3 Port 2- Analog capable - Vacuum Sensor Nozzle 6
In OpenPnP , The oversimplified sequence is :
(1) Open Vacuum
(2) Pick part
(3) Bottom Camera sequence
(4) Place part
(5) Close Vacuum
I am having problem with either slow readings from Duet Controller or slow reaction from OpenPnP
The issue is that after placing the part it does not get the readings in time to close the vacuum (Errors saying vacuum not off) unless
i add 300ms to the Nozzle place Dwell time. That allows OpenPnP to get the change in reading in order to close the vacuum.
if i don't add the Nozzle place dwell time (>290 ms) or just leave it at default 0 then it does not close the Vacuum
NOTE: i did post the same question on the OpenPnP google group and @dc42 commented that " Analog sensors on Duet boards are read every 250ms, so I think this explains your observation."
How i am reading the analog sensors values from Duet3D (testing using a macro ) or OpenPnP commands:
M118 P0 S{sensors.analog[0].lastReading} ; Check Vacuum Pressure BEFORE closing vacuum
M42 P0 S0 ; Close Vacuum
M118 P0 S{sensors.analog[0].lastReading} ; Check Vacuum Pressure AFTER closing vacuum
Considering what @dc42 noted, it seems analog sensor last reading values are read / updated/ polled every 250 ms .
SMC NPN Vacuum Pressure Digital Sensors -ZSE30A-01-C-L have a switch output response time of 2.5 ms or less (With anti-chattering function: 20, 100, 500, 1000, 2000 ms )
Is there a way to adjust that time frequency from 250 ms to may be every 5 ~ 20 ms if possible ? Or is there a way to configure the sensors to accomplish this ?
Looking on DWC the frequency seem to be fast enough but when reading the analog values it seems to reflect what @dc42 noted

ZSE30A.pdf