Hello everyone! I'm using the analog signal to determine a limit switch. Through a reading from a magnetic sensor that has an analog voltage output that is read by the 7i77 board, I developed a logic in the LinuxCNC classicladder. The logic is that when the voltage is greater than 7.5 volts then it activates the output %Q81 called MA-Z, when the voltage is less than 1.0 volts then it activates the output %Q80 called MI-Z and the home position is when the voltage is 6 volts it activates %Q82 called HO-Z.
I made a virtual connection in the HAL file
Code:
# --- HOME-Z ---
net home-z <= classicladder.0.out-82 # Analog Voltage Reference Virtual Switch
# --- MIN-Z ---
net min-z <= classicladder.0.out-80 # Analog Voltage Reference Virtual Switch
# --- MAX-Z ---
net max-z <= classicladder.0.out-81 # Analog Voltage Reference Virtual Switch
Includes the configuration to activate Home by switvch in the INI file
Code:
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 5
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
The machine makes the movements when pressing the + and - buttons of the home z, but when trying to do home axi with exio Z, a movement calculation error appears. As per the video below
Please, does anyone have any suggestions, I'm trying to find a way to make this Z axis movement stay in an initial position above the top, to avoid the movement collision of the tools. But I can't get the system and 7i77 board to interpret the virtual limit switch, could it be that I'm missing some configuration in the HAl or INI file so that the home axi Z works correctly?
File Attachment:
File Name:
hal.hal
File Size:23.33 KB
File Attachment:
File Name:
ini.ini
File Size:5.91 KB