Signal for safety control watchdog

More
29 Mar 2017 14:57 #90510 by Chre9
Yes, I deleted it because I wanted to upload the correct version.

I just found another typo: fctn instead of fnct :dry:
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.

More
30 Mar 2017 08:40 #90552 by Chre9
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.

Please Log in or Create an account to join the conversation.

More
30 Mar 2017 09:00 #90553 by andypugh

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.

More
31 Mar 2017 11:17 - 31 Mar 2017 12:24 #90633 by Chre9
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.
Last edit: 31 Mar 2017 12:24 by Chre9.

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 13:51 #90643 by Todd Zuercher
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?

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 14:16 #90644 by Chre9
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

Please Log in or Create an account to join the conversation.

More
31 Mar 2017 15:52 #90654 by Todd Zuercher
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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum