BigJohnT wrote:cwebs wrote:Ok you guys. The fish in my picture has more hair left the me.
I did as you told me to do John. Those three lines in hal configuration worked. True, turned the relay on... False, turned the relay off. Then, net machine.is-on halui.machine.is-on => parport.0.pin-16-out , turned it on and off uning the power button in Axis! So what do I need in the .hal file?
Edit. Will I still have to "unlinkp" now we know the pin will work?
After testing with halconf I tried " net machine.is-on halui.machine.is-on => parport.0.pin-16-out " in the .hal file. Did not work. I also tried the "setp parport.0.pin-16-out TRUE and false lines. no help.
Another thing I don't understand is when to use ... and ---. ( dots and dashes), looking more like morse code to me.
PS, The driver power switch in only three steps away and it's begining to look like I might lose weight going back and forth to it.
The only line you should need in your hal file is:
net machine.is-on halui.machine.is-on => parport.0.pin-16-out
unlinkp is a way to unlink a pin usually for testing.
If it worked in show hal configuration it should work in your hal file.
Do you have more than one hal file?
Which file did you add net machine.is-on halui.machine.is-on => parport.0.pin-16-out to?
What does "Did not work." mean? you got an error? nothing changed states?
Help us understand what your seeing...
What is the dots and dashes about?
John
This line works correctly in hal configuration, relay turns on and off buy clicking on the Axis power button. (toggle machine power)
net machine.is-on halui.machine.is-on => parport.0.pin-16-out
I put the line of code in the .hal file. Then toggle machine power. No state change. That's when I pull out more hair from my head.
I have a post gui hal file that has the joypad code. I'll post that when I get to the machine latter today. I looked at that code and "machine.is-on" is NOT used there. "Machine.on" is used.
"What is the dots and dashes about?" LOL. When writing code, I don't understand when I need, periods, or dashes, or spaces.
To sum it up, the line of code WORKS in hal configuration, doesn't in the .hal file. Carl