Microscript Commands to Configure CAN

9 years 3 months ago #29529444 by smhamaha
Options for configuring the "CAN Bus" a. Bit rate, b. Node ID, c.Listen Node ID, d. Heartbeat e. Send Rate have been provided in the Windows Uitilty Software.

Can I know the Microscript Commands to change the above mentioned CAN bus configurations ? It is not mentioned in the User manual too.

Thank You.

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

9 years 3 months ago #29529446 by Griffin Baker
Replied by Griffin Baker on topic Microscript Commands to Configure CAN
Any changes to the configurations through script is used by the setconfig(_command, cc, nn) command, where cc = motor channel referenced to the command, and nn is the value change.

Example change motor 1 from open loop mode config default to closed loop speed mode using script.

setconfig(_mmod, 1, 1) ' the _ is placed before the command and you should see the syntax of the command change colors.

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

9 years 3 months ago #29529454 by smhamaha
Thank You, but I would like to know the "_command" to change the

1.Node ID
2.Listen Node ID
3.Bit rate of the CAN bus
4.Heartbeat
5.Send rate of the CAN bus in "minican" mode
and 6. how to configure in one of the available CAN modes.

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

9 years 2 months ago #29529455 by Griffin Baker
Replied by Griffin Baker on topic Microscript Commands to Configure CAN
If you make a configuration change in the configuration tab, and then save to controller; go directly to the console tab, and in the in data box, it will show you the command that was issued to make that change. You just replace the "^" with a "_".

Like my previous example, if I were to change motor 1 to closed loop speed, and saved to controller, what I would expect to see is "^mmod 1 1". The only difference in the scripting is that I would use setconfig(_mmod, 1, 1). The can bus configuration changes follow in the same manner.

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

9 years 2 months ago #29529473 by smhamaha
Thank You.

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

Moderators: tonysantoni
Time to create page: 0.057 seconds