Troubleshooting
Common Issues
| Problem | Cause | Solution |
|---|---|---|
| Data shows UNAVAILABLE | Source disconnected or expression error | Check connectivity; validate expressions |
| Double-counting parts | Multiple rising edges per cycle | Add debounce or adjust the threshold |
| State not changing | Expression always false | Test each condition independently |
| Wrong data type | String vs number mismatch | Use explicit conversion functions — see Data Types |
Debugging Tips
- Start simple. Get basic connectivity working before adding transforms.
- Test incrementally. Add one variable at a time and verify its output before chaining the next operation.
- Check data mapping. Confirm transformed items are mapped correctly in Machine Settings.
- Use Diagnostics. View raw data items in the machine's Diagnostics tab to see exactly what the adapter is receiving.
YAML Syntax Problems
Most script errors that are not logic errors are YAML errors. The YAML Guide covers the syntax in full, but these four account for most failures:
- Indent with spaces, not tabs
- Quote strings that contain a colon followed by a space
- Boolean values are lowercase
true/false - Comments start with
#
Related
- YAML Guide — full syntax reference
- Complete Examples — working scripts to compare against
- Machine Not Reporting — when no data arrives at all
- Part Counting — when part counts are wrong