Signal for safety control watchdog
29 Mar 2017 14:57 #90510
by Chre9
Replied by Chre9 on topic Signal for safety control watchdog
Yes, I deleted it because I wanted to upload the correct version.
I just found another typo: fctn instead of fnct
Now I find all the HAL-Pins, so that was the solution.
This is the kind of stupid mistakes, that cost you hours of thinking.. Wow
Thanks for your advice!
I just found another typo: fctn instead of fnct
Now I find all the HAL-Pins, so that was the solution.
This is the kind of stupid mistakes, that cost you hours of thinking.. Wow
Thanks for your advice!
Please Log in or Create an account to join the conversation.
30 Mar 2017 08:40 #90552
by Chre9
Replied by Chre9 on topic Signal for safety control watchdog
Is it right, that my read-discrete-input hal pins are considered outputs and the write-multiple-coils is considered input in halshow?
Seems wrong to me, but I don't know how to change this.
Seems wrong to me, but I don't know how to change this.
Please Log in or Create an account to join the conversation.
30 Mar 2017 09:00 #90553
by andypugh
Yes.
Consider whether the HAL pins provide a value _to_ HAL or are given a value _from_ HAL.
Replied by andypugh on topic Signal for safety control watchdog
Is it right, that my read-discrete-input hal pins are considered outputs and the write-multiple-coils is considered input in halshow?
Yes.
Consider whether the HAL pins provide a value _to_ HAL or are given a value _from_ HAL.
Please Log in or Create an account to join the conversation.
31 Mar 2017 11:17 - 31 Mar 2017 12:24 #90633
by Chre9
Replied by Chre9 on topic Signal for safety control watchdog
So the FC write_multiple_coils for example is a request to the PNOZmulti device to write coils, that can be read by MB2HAL,
not a command for MB2HAL to write coils into the device, is that right?
Is there anything else I am missing? Like something to activate MB2HAL? In Halshow all values are 0, although by using modbus poll on another pc I can connect to the device and see, that some are 1.
not a command for MB2HAL to write coils into the device, is that right?
Is there anything else I am missing? Like something to activate MB2HAL? In Halshow all values are 0, although by using modbus poll on another pc I can connect to the device and see, that some are 1.
Last edit: 31 Mar 2017 12:24 by Chre9.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
31 Mar 2017 13:51 #90643
by Todd Zuercher
Replied by Todd Zuercher on topic Signal for safety control watchdog
You have to make connections to the mb2hal hal pins to change the state of them
For testing you can use the halcmd "setp" to change the input pin values and watch to see what happens.
Is that what you are asking?
For testing you can use the halcmd "setp" to change the input pin values and watch to see what happens.
Is that what you are asking?
Please Log in or Create an account to join the conversation.
31 Mar 2017 14:16 #90644
by Chre9
Replied by Chre9 on topic Signal for safety control watchdog
I'm currently trying to send a signal to modbus input i4 of the device, which has the address 4.
So I put "setp mb2hal.18.00 1" into the hal file and the following transaction into my ini:
[Transaction_18]
FIRST_ELEMENT=4
NELEMENTS=1
MB_TX_CODE=fnct_15_write_multiple_coils
MB_BYTE_TIMEOUT_MS=1000
HAL_UPDATE_RATE=0.0
DEBUG=1.0
But there is no signal arriving at the device. Is there any mistake in my setup?
With modbus poll I can send signals without problems, so the device is working
So I put "setp mb2hal.18.00 1" into the hal file and the following transaction into my ini:
[Transaction_18]
FIRST_ELEMENT=4
NELEMENTS=1
MB_TX_CODE=fnct_15_write_multiple_coils
MB_BYTE_TIMEOUT_MS=1000
HAL_UPDATE_RATE=0.0
DEBUG=1.0
But there is no signal arriving at the device. Is there any mistake in my setup?
With modbus poll I can send signals without problems, so the device is working
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
31 Mar 2017 15:52 #90654
by Todd Zuercher
Replied by Todd Zuercher on topic Signal for safety control watchdog
What is "modbus poll" that you are sending signals to the device with?
Try setting the DEBUG=1.0 to DEBUG=3 and remove the "setp mb2hal.18.00 1" from your hal file. Then start Linuxcnc from the command line and watch for any mb2hal debugging info, and make sure it is actually connecting to and communicating with the device. Next open "Show Hal Configuration" from the Machine pull down menu, confirm your mb2hal pin name, then in the "Test HAL command" type setp mb2hal.18.00 1. Check to the terminal window to see what debug info is being spit out.and check your modbus device to see if it recieved anything. Then you could try setp mb2hal.18.00 0 and check.
I'm not sure what other advice I can give other than confirming the communication settings on the device, and checking other register addresses.
Try setting the DEBUG=1.0 to DEBUG=3 and remove the "setp mb2hal.18.00 1" from your hal file. Then start Linuxcnc from the command line and watch for any mb2hal debugging info, and make sure it is actually connecting to and communicating with the device. Next open "Show Hal Configuration" from the Machine pull down menu, confirm your mb2hal pin name, then in the "Test HAL command" type setp mb2hal.18.00 1. Check to the terminal window to see what debug info is being spit out.and check your modbus device to see if it recieved anything. Then you could try setp mb2hal.18.00 0 and check.
I'm not sure what other advice I can give other than confirming the communication settings on the device, and checking other register addresses.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds