Using OptoMMP.NET to control a stepper motor

I am trying to control a SNAP-SCM-ST2 using the OptoMMP.NET DLL. I would like to know how to do the following:

Configure the device - I do not see an EnumDigitalFeature that seems to apply to the ST2.
Set the direction - This may be as easy as writing a digital state to the correct address.
Set a pulse count and frequency - Can I tell the ST2 that I need it to take a certain number of steps and a stated frequency?

We use the OptoMMP for the majority of our work and I would prefer to do it here rather than through PACControl.

Thanks for any help you can give.

2 Likes

Hi Joe, welcome to the Opto22 forums.

I’ve not done anything with .NET, Im a pure PAC Control guy… so speaking from that side of the fence…
The serial modules are just that. They use serial commands from the controller/brain/MMP to work with the module, so I am not sure you will need the EnumDigitalFeature.
The serial modules don’t show up in the strategy at all. You just have to put a mental note (code comment) that one is plugged into the rack where it is.
You can communicate with them via Ethernet and the module position on the rack port number.

Not sure if that’s an option for you, but just use the controller/brain IP address and the corresponding port number.

Because its a serial module, there is no fire-and-forget (take x steps at y frequency), so that is done in the controller in the firmware. Im unsure how to tickle that part of the MMP address space.

There are a few .NET guys here on the forums. I’ll track them down and let them know about this thread.

1 Like

Thanks Beno. I was able to successfully talk with it and give it frequency and direction.

2 Likes