Increasing Digital I/O

More
25 Apr 2013 21:48 #33199 by beltramidave
I have been trying to follow the directions to increase the number of my digital I/O, but am not having any luck and I assume it could be a syntax error.

I have put the following in my custom hal: loadrt motmod [num_dio=[32] [num_aio=[16]
I have also tried: loadrt motmod ([num_dio=[32]] [num_aio=[16]])

This is the error I get when trying to start Axis: custom.hal:4: Empty variable name.

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

More
25 Apr 2013 22:49 #33203 by beltramidave
Replied by beltramidave on topic Increasing Digital I/O
I believe that I figured this out. I added: num_dio=32 num_aio=16 to

loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=32 num_aio=16

This is located in my main Hal file.
The digital and analog pins then showed up in my hal meter.

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

More
23 Apr 2014 18:49 #46249 by terans1085
Replied by terans1085 on topic Increasing Digital I/O
Hi, I know this is a year old thread but I am encountering the exact same problem.

Did you manage to solve the problem completely? As in did the extra outputs actually work using G64 (and so on)?

In my case, using your solution managed, I managed NOT to get an error when using G64 on the additional outputs, however the outputs do not physically turn on/off. Any insight would be appreciated :)

Thanks and regards,

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

More
23 Apr 2014 22:39 #46261 by andypugh
Replied by andypugh on topic Increasing Digital I/O

however the outputs do not physically turn on/off. Any insight would be appreciated,


I am puzzled by the word "physically" there. Do you mean that the values do not change in HAL, or that you do not see any changes on physical output pins?

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

More
28 Apr 2014 19:08 #46426 by beltramidave
Replied by beltramidave on topic Increasing Digital I/O
Yes this did work for me. My application was creating pyvcp buttons to call MDI commands and then turn on a pyvcp led that corresponded with the button pushed. You must include the pin setup in your custom_postgui file. Here is a sample of what I did. Hope this helps.

# These commands are for the 'general' buttons.

net general-so1-button halui.mdi-command-00 <= pyvcp.so1-button
net general-so2-button halui.mdi-command-01 <= pyvcp.so2-button


# These commands are for the 'general' Leds.

net general-led-so1 motion.digital-out-00 => pyvcp.led-so1
net general-led-so2 motion.digital-out-01 => pyvcp.led-so2

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

More
29 Apr 2014 14:52 #46461 by terans1085
Replied by terans1085 on topic Increasing Digital I/O
Thank you guys for your feedback however I think I may have managed to resolve this by adding the following to the HAL file:

loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=32

Then for each new output:

# --- DOUT-04 ---
net dout-04 hm2_5i25.0.7i77.0.0.output-04

# ---digital in / out signals---
net dout-04 <= motion.digital-out-04



Regards,

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

Time to create page: 0.076 seconds
Powered by Kunena Forum