Start fan from DSF
-
Hi,
Is there a way to start a fan from the DSF ?
I tried Fan.ActualValue and Fan.RequestedValue as both have setters but it does nothing.Thanks for the help
Bye
Juan -
Yes, use M106. The object model is read-only.
-
@chrishamm arf bad news...
but do you mean with /opt/dsf/bin/CodeConsole
or is there a way to do it inside the DSF ?I am looking at DuetAPI.Commands but it seams to be one way too.
-
You can either send a preparsed code or a simple text-based code using a command connection. What programming language are you using?
-
@chrishamm
I'am using c#
If you have a little code snipet it would save me the trouble of fumbling. -
@Donpi Here is a very basic program that demonstrates the two ways how a G/M/T-code can be sent to DSF:
using DuetAPI.Commands; using DuetAPIClient; using System.Threading.Tasks; namespace TestApp { static class Program { static async Task Main(string[] args) { using CommandConnection cmdConnection = new CommandConnection(); await cmdConnection.Connect(); // Do M106 like you would from a console await cmdConnection.PerformSimpleCode("M106 S0.18"); // Do full code Code code = new Code { Type = CodeType.MCode, MajorNumber = 106 }; code.Parameters.Add(new CodeParameter('S', 0.18)); await cmdConnection.PerformCode(code); } } }
-
@chrishamm \o/ \o/ \o/ Thank you
One last thing, can you tell me the diffrence between the two ways ?
Or are they strictly the same ? -