Modbus communication with HMI eliminating the PC
Moderators: TomKerekes, dynomotion
Modbus communication with HMI eliminating the PC
Respected Sir,
1. Is it possible to communicate with any HMI (via modbus also) and operate with kmotion CNC without using Computers?
2. Is there a way to lock the kmotion gcode screen with password so that noone can edit the gcode?
3. Is there an intenal memory available in the kflop so that we can save the gcode program.if it is possible whether the saved program can be
accessed without using computer?
4. Is there a way to handle kflop without using computer?
regards,
M.Ajith Arawinth.
1. Is it possible to communicate with any HMI (via modbus also) and operate with kmotion CNC without using Computers?
2. Is there a way to lock the kmotion gcode screen with password so that noone can edit the gcode?
3. Is there an intenal memory available in the kflop so that we can save the gcode program.if it is possible whether the saved program can be
accessed without using computer?
4. Is there a way to handle kflop without using computer?
regards,
M.Ajith Arawinth.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Modbus communication with HMI eliminating the PC
hi Ajith ,
Furthermore using a Screen Script you can set the Var parameter of the GCode Control to 2 to make it permanently read only. The values of Var are:
-1 = default behavior allow the Operator to change (R/W on startup)
0 = Set Read Only and allow the Operator to change
1 = Set R/W and allow the Operator to change
2 = Set Read Only and do not allow the Operator to change
I suppose you could set 2 for read only and then add a User button to run a C Program to ask for a password and if correct set to 1 using screen script.
C:\KMotion435f\C Programs\FlashNonVolatile\FlashCoordMotionBuffer\
Well no, KMotionCNC runs on a Windows PC1. Is it possible to communicate with any HMI (via modbus also) and operate with kmotion CNC without using Computers?
Not with a password. But if you right click on GCode Control there is a Make Read Only option2. Is there a way to lock the kmotion gcode screen with password so that noone can edit the gcode?
Furthermore using a Screen Script you can set the Var parameter of the GCode Control to 2 to make it permanently read only. The values of Var are:
-1 = default behavior allow the Operator to change (R/W on startup)
0 = Set Read Only and allow the Operator to change
1 = Set R/W and allow the Operator to change
2 = Set Read Only and do not allow the Operator to change
I suppose you could set 2 for read only and then add a User button to run a C Program to ask for a password and if correct set to 1 using screen script.
Not really. KFLOP only has 1 MByte of User Flash and no GCode Interpreter. Its somewhat complicated but some Users have saved relatively small jobs in Flash that could then be executed off-line. One example was a stand alone cake icing dispenser that could dispense "Happy Birthday" off line. The pattern is not saved as GCode but rather a small Job is run using KMotionCNC and then the Coordinated Motion Buffer in KFLOP is then saved and then re-loaded and re-executed off line. See the example in the folder:3. Is there an intenal memory available in the kflop so that we can save the gcode program.if it is possible whether the saved program can be
accessed without using computer?
C:\KMotion435f\C Programs\FlashNonVolatile\FlashCoordMotionBuffer\
KFLOP can run stand alone using User C Programs in Flash Memory. But our Libraries for GCode Interpreter, Trajectory Planning, Kinematics run on the PC and require a PC. See the architecture here.4. Is there a way to handle kflop without using computer?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Modbus communication with HMI eliminating the PC
Respected Sir,
normally i have been used the following c code for password authentication . but you suggested when the password is correct ,set the var parameter to 1.but i cant find the variable used to set "var parameter".Furthermore using a Screen Script you can set the Var parameter of the GCode Control to 2 to make it permanently read only. The values of Var are:
-1 = default behavior allow the Operator to change (R/W on startup)
0 = Set Read Only and allow the Operator to change
1 = Set R/W and allow the Operator to change
2 = Set Read Only and do not allow the Operator to change
Var2.png
I suppose you could set 2 for read only and then add a User button to run a C Program to ask for a password and if correct set to 1 using screen script.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Modbus communication with HMI eliminating the PC
Well no, scanf isn't supported. See the MessageInputBox.c example of how to ask the Operator for a value.
To change Var (or any parameter of a control) you can re-define it with the changed parameter using a screen sub-script. See the attached two screen SubScript files. One sets the Edit Control to Read Only and the other to Read/Write. Also two C Program examples on how to execute the SubScripts.
HTH
To change Var (or any parameter of a control) you can re-define it with the changed parameter using a screen sub-script. See the attached two screen SubScript files. One sets the Edit Control to Read Only and the other to Read/Write. Also two C Program examples on how to execute the SubScripts.
HTH
- Attachments
-
- RO.c.txt
- (277 Bytes) Downloaded 110 times
-
- RW.c.txt
- (277 Bytes) Downloaded 103 times
-
- GCodeRW.scr.txt
- (185 Bytes) Downloaded 101 times
-
- GCodeRO.scr.txt
- (183 Bytes) Downloaded 94 times
Last edited by TomKerekes on Mon Jun 20, 2022 9:43 pm, edited 1 time in total.
Reason: Oops I originally miss-read your response.
Reason: Oops I originally miss-read your response.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Modbus communication with HMI eliminating the PC
Respected sir,
I had tried the subscript and c program and got the following error. when i defined the subscript directly as a button and execute the subscript by pressing the button i got the below popmessage the kmotion cnc application got closed automatically. next i had tried the c program that you had send. i got the following error popped up. i also checked the C program in dynomotion application and got the same error that "KflopToKMotionCNCFunction" not found i also tried the way to get password but i can get the value from keyboard but i cannot compare the value in if clause the execute remaining program.
I had tried the subscript and c program and got the following error. when i defined the subscript directly as a button and execute the subscript by pressing the button i got the below popmessage the kmotion cnc application got closed automatically. next i had tried the c program that you had send. i got the following error popped up. i also checked the C program in dynomotion application and got the same error that "KflopToKMotionCNCFunction" not found i also tried the way to get password but i can get the value from keyboard but i cannot compare the value in if clause the execute remaining program.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Modbus communication with HMI eliminating the PC
Please use Version 4.35f.
Please grab screen shots with Alt-Print Screen rather than photos.
It looks like you have extra spaces in the filenames.
KFLOPtoKMotionCNCfunctions.c must be in the same folder as the C Program to be found if no path (absolute or relative) is specified.
Please grab screen shots with Alt-Print Screen rather than photos.
It looks like you have extra spaces in the filenames.
KFLOPtoKMotionCNCfunctions.c must be in the same folder as the C Program to be found if no path (absolute or relative) is specified.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Modbus communication with HMI eliminating the PC
Respected sir,
I tried to change the gcode screen in the kmotion cnc via c program in the below i had executed the program by defining it as a button. when I executed the program i got the below popwindow.
I tried to change the gcode screen in the kmotion cnc via c program in the below i had executed the program by defining it as a button. when I executed the program i got the below popwindow.
yeah its in the same folderKFLOPtoKMotionCNCfunctions.c must be in the same folder as the C Program to be found if no path (absolute or relative) is specified.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Modbus communication with HMI eliminating the PC
It seems you are still using V4.34.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Modbus communication with HMI eliminating the PC
Respected sir,
today only I have changed the Kmotion version.
may i know the procedure to save my C program in the kflop flash memory(ROM)?
how many program i can save in my kflop internal memory?
if i can save more than one program how can i able to access it without any computer?
today only I have changed the Kmotion version.
may i know the procedure to save my C program in the kflop flash memory(ROM)?
how many program i can save in my kflop internal memory?
if i can save more than one program how can i able to access it without any computer?
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Modbus communication with HMI eliminating the PC
We don't recommend Flashing things to KFLOP unless you absolutely must operate without the PC
Each Thread can contain one program. There are 7 Threads.
Any Thread can be set to Execute on power up.
See the manual here.
Each Thread can contain one program. There are 7 Threads.
Any Thread can be set to Execute on power up.
See the manual here.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.