We don't want to load a NUMREG.VR file from another robot because there are some registers that are different. But, we would like to add comments to register 150 and register 151 in every robot. Is there a KCL command that we can use to name just these two registers? Thanks!
Is there a KCL command to name (comment) a register?
-
barrett50cal -
May 14, 2016 at 5:44 PM -
Thread is marked as Resolved.
-
-
I've used this in Karel all the time:
numreg_label[1]=''
there is also:
di_label[1]=''
do_label[1]=''
etc...posreg_label[1]=''
$UALRM_MSG[1]=''
$UALRM_SEV[1]=0I use a spread sheet to populate all the values and then paste them into a Karel program that write all the comments.
Just a little bit quicker than doing it from the teach pendant...Phil
-
You can use this built in from a Karel Program, would change the comments for the registers you need.
SET_REG_CMT(150,comment,STATUS)
SET_REG_CMT(151,comment,STATUS)Luis
-
I am trying to get this command to work by executing a .cm file. Has anyone been able to do this? If so, can you explain how.
So far I have create a .cm file with one line in it: SET_REG_CMT(1,test,STATUS)
When I execute this I get the following error: SP -015 $ 38000F, no message found
I have also tried: SET_REG_CMT(1,"test",STATUS)
-
Why not via the webserver? I've used that many times.
-
That is what I currently do. I am looking for a way to automate this from a spreadsheet, but without needing karel. It seems that the cm file might be able to do this.
Sent from my SM-G930V using Tapatalk
-
Have you tried using linuxsand's comment tool? It can be found under the Fanuc Tools link at the top of the page. I have only used it for loading comments to DI/DO, but it will do registers as well. I have my comments on a spreadsheet and it loads them for me, works pretty well.
-
Have you tried using linuxsand's comment tool? It can be found under the Fanuc Tools link at the top of the page. I have only used it for loading comments to DI/DO, but it will do registers as well. I have my comments on a spreadsheet and it loads them for me, works pretty well.Just tried it out. This does exactly what I was looking for.
-
I've attached a very basic example on how to set position register / register comments. It's a KAREL program.
You can call this program from your main program so you will have the latest version of your comments in the robot. -
I am trying to get this command to work by executing a .cm file. Has anyone been able to do this? If so, can you explain how.So far I have create a .cm file with one line in it: SET_REG_CMT(1,test,STATUS)
When I execute this I get the following error: SP -015 $ 38000F, no message found
I have also tried: SET_REG_CMT(1,"test",STATUS)
A .CM file won't work with KAREL syntax, and KCL (which is supported by .CM) does not have any command to change comments on IOs, registers etc. The way I would do it if I wanted to use a .CM file is that I would create a KAREL program which changes the names and run it from the .CM file (using PCLOAD, RUNPC, DELPC, VRCLEAR). In that way, you can make a nice package, for example with a .CSV file to quickly edit names of IOs and registers on your PC, and then to read it via the Karel program and set the all the names.
The point of using a .CM file here would be that you can start that KAREL program even in controlled start - which means, that you can use the same .CM file to load some variable/config files at the same time.I've actually done sth like that for one of my current projects, the only difference being that I am actually loading the whole DIOCFGSV.IO, NUMREGS.SV etc. files, as the whole configuration and IO names are same for all the robots on the whole line... The .CM also loads some standard .TP programs and changes some system variables which are not affected by the files that I load (so Macros' config, BG-Logic config, program start method etc.).
The next step that I want to do is to make the whole package more universal and configurable via .CSV sheet (or sheets), where you could put the names of the files to load, IOs and registers to rename, the configuration to use and so on. Karel programs (executed via .CM file) would then recognize the data to process and config the controller based on that. That is 100% doable, but I have no time to do that at the moment