SoMachine\CoDeSys motion question

Clevername

Member
Join Date
Oct 2009
Location
NY
Posts
36
Hopefully I can articulate this correctly. I'm using SoMachine from Schneider but hopefully this translates to anyone that can help me.

I'm trying to have a motor follow an analog signal from a Banner laser distance marker for feedback. Using the motion function block "MC_MoveVelocity" the motor will indeed run at the integer from the laser but it not execute the block again until the "execute" input of the function block is toggled again on the raising edge. So if this laser integer value changes the motor will not immediately follow the laser until you toggle the input again.

This is silly to me mostly because I'm an analog guy :)

Should I put a "Blink" or "Oscillator" input onto the execute input to just toggle the input at an insane speed?

There is an bool output of the block that gives an indication that the input speed has been met. Is there some sort of compare from this I can drive the execute input?

Being new to this and by myself I'm getting more confused and getting scatter brained the more I think about it. I can make it work I'm sure but what is the normal practice?
 
Last edited:
I am using a GE RX3i PAC Motion module and using an MC_MoveVelocity command which receives the target velocity from a PID instruction and in order to make it adjust the velocity on the fly, I do exactly what you mentioned and use a .1 sec timer to enable/disable the MC_MoveVelocity command. I suspect that you will probably need to do this to lock in the new target velocity.

Regards
 
I do exactly what you mentioned and use a .1 sec timer to enable/disable the MC_MoveVelocity command.
Regards

I checked my code this morning and I am actually updating the MC_MoveVelocity Commanded velocity every 10 mS, not every 100 mS as I mentioned in the previous post.

Sorry
 
I checked my code this morning and I am actually updating the MC_MoveVelocity Commanded velocity every 10 mS, not every 100 mS as I mentioned in the previous post.

Sorry

No problem and thanks for the input. I'm using a blink function to drive it now like yourself. You'd think there would be a more real time motor control...

If you are using the same platform as me what is the syntax for the time of the block? The help file is worthless and if I use .010 I get compile errors. I've also tried t#010 and other stuff like that and it still hates me.

Thanks for the help.🍻
 
You may use velocity setpoint compare
MC_MoveVelocity.exe := CurrentVeloSetpoint <> MemoryVeloSetpoint;
MC_MoveVelocity();
MemoryVeloSetpoint := CurrentVeloSetpoint;

Every time your velocity setpoint change, your execute will be trigger.
 

Similar Topics

I have to modify a PAC drive lmc controller so that an external scada can acess some tags. The scada integrator asks us to make does tags...
Replies
3
Views
1,601
Hello! I think I have a basic question and I'm hoping someone can point me in the direction of a solution. I am new to PLC programming and my...
Replies
2
Views
1,661
Hi there, I am trying to develop an application using the somachine software, however have come across a drama. The 'AlarmManager' function isn't...
Replies
3
Views
2,966
Hello, I am fairly new to plc programming and am now tasked with converting the company software standard from Siemens TIA Portal to SoMachine, or...
Replies
2
Views
2,997
Hi guys Using somachine 4.1 sp1. When i run the web vizu in chrome i get an error that your browser doesn't support html5 canvas. Even though this...
Replies
2
Views
3,776
Back
Top Bottom