Hello Guest it is March 28, 2024, 05:51:51 PM

Author Topic: [CSMIO-IP/S + MACH3] using an analogue output to control an external device  (Read 7562 times)

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #20 on: December 02, 2020, 01:38:20 PM »
---I put B... if the value is over a certain value,

witch value?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #21 on: December 02, 2020, 01:41:30 PM »
Hi Tom,

Thank you for your information.
I meant the value of the GetOemDro(804).
Your assumption is that its range is 1-1000. But, where can we set that range?
Is it like a default value?



see it like a virtual axis there is no range to define, only Thing is to Zero it before you start.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #22 on: December 02, 2020, 01:53:37 PM »
Hi Tom,

I managed to make the analog output work using macropump.
All thanks to your help!!

A funny thing is happening to the B-axis. Please see the video below.
https://youtu.be/BgLlfBCSrEA
The motor setting is also attached.
Do you know what the problem is?

With the motor setting, B1 output GetOemDRO value 1.
The problem is when I changed the value too much in a time, the value was just screwed up.

And do you know the G-code to set the OmeDRO to be zero?

Best Regards,
Eric.
« Last Edit: December 02, 2020, 01:55:37 PM by razer00 »

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #23 on: December 02, 2020, 02:04:10 PM »
with
Code: [Select]
SetModOutput(81,GetOemDro(804)*4.095)

the value is scaled to 0-100 not to 0-1000

for 0-1000 use
Code: [Select]
SetModOutput(81,GetOemDro(804)*0.4095)

to set b axis to Zero use

Code: [Select]
SetOemDro(804,0)
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #24 on: December 03, 2020, 07:16:53 AM »
Hi Tom,

I encounter another problem. Never going smoothly.
As soon as B... command is input (using macropump), the whole motion stops.
Any thought?

Best Regards,
Eric.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #25 on: December 03, 2020, 07:47:01 AM »
a

G1 X100 Y100 B100 F50
G1 X0 Y0 B0

should not stop Motion

metric if in imperial use suitable values
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #26 on: December 03, 2020, 08:16:27 AM »
The problem is that the DRO values in the display change, but the actual motion stops when the B... command is used.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #27 on: December 03, 2020, 08:18:20 AM »
is the b axis enabled and assigned in CSLAB plugin?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #28 on: December 06, 2020, 10:00:53 AM »
Hi Tom,

The problem is still unsolved.

I've used the following G-code.
G90
G0 X0 Y0 B0
M7
M9
G1
X 26.0 Y 0 B 19.5 F 300
X 27.0 Y 0 B 39.0 F 300
X 28.0 Y 0 B 58.5 F 300
X 29.0 Y 0 B 78.0 F 300
X 30.0 Y 0 B 97.5 F 300

And the macropump.m1s was:
SetModOutput(81, GetOemDro(804))

B-axis setting was in a way that B1 command output the analog output value 1.
In theory, B4095 should output 10V. And when we checked B command on DMI, it worked.

The problem is that when we run the G-code above, as soon as B command starts being used, the motion stops.
Interestingly, the G-code still runs without any machine movement.

Do you know what the problem is?

Best Regards,
Eric.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: [CSMIO-IP/S + MACH3] using an analogue output to control an external device
« Reply #29 on: December 06, 2020, 02:30:47 PM »
hello Eric,

tested your code here, and it is running without stopping movement.

can you pls post your prifile XML, than i will have a look.

Regards Tom.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.