Executing g-code from file within a ST-program in the software Automation Studio from B&R - st

I have a 3-axis system, which resembles the CNC-axis, and a PowerPanel from B&R. Now I plan to execute the g-code, which I read from a file, which is fe located in the Downloads folder. This will be done with fbs from B&R Automation Studio.
I got confused with the help, since it says in drive engineering/mapp Motion/technologie/function block/mpcnc3axis/description the part of moveProgram, where it redirects you to MC_BR_MoveProgram \ description. There stands that you can start the program with [Program name prefix] [File device name:] [Path] Program name syntax. Now I am not sure how to include this with my MpCnc3Axis code or if I can use the syntax also in MpCnc3AxisParType ProgramName part to start the program from fe Downloads Folder, since it didn't work with McPrgAdvParType InitProgramName.
Any links to related material would be appreciated.
I would also accept a solution with C, if it is easier.

Depending on if you are willing to buy software licences from B&R, running a CNC system is more or less easy.
The state of the art implementation is with mappMotion. It requires software licenses and gives you ready to go FUBs to execute nc files, jogging, direct movements, etc. This works the same way for different robot types and CNC kinematics. I recently uploaded a small implementation of a robot on GitLab: https://gitlab.com/kirni/bur_robotic_sample
The alternative is the old ARNC0 approach. No more new features are implemented, but it is free - as long as you do not need any functions that require a Dual Use agreement (i.e. 5 Axis CNC, etc.). The implementation is rather complex and is definitely to extensive to be answered completely at stackoverflow.
However Automation Studio ships with a sample for a two axis CNC. In the logical view you can add a new object Library Samples which opens a dialog where you can select Samples/Motion/CNC system (2 axis)/LibARNC0_Basic_ST.zip. This would be the best starting point, which is also documented in the help in MotionControl/ACP10 ARNC0/Examples/CNC or guid: 4620bb1c-8694-4f27-87d0-805686d7c0c8 as of AS 4.4.4.64.
I hope this helps!

Related

Windows Defender to find localization numeric value for Reporting

i need to create some SSRS reports For Windows Defender .. i need to find localization numeric values for Detection source
Detection Source: <Detection source> for example:
User: user initiated
System: system initiated
Real-time: real-time component initiated
IOAV: IE Downloads and Outlook Express Attachments initiated
NIS: Network inspection system
IEPROTECT: IE - IExtensionValidation; this protects against malicious webpage controls
Early Launch Antimalware (ELAM). This includes malware detected by the boot sequence
Remote attestation
Reference link enter link description here
i need to select in case so i need to know numeric values for each of option.
one thing is can use
SrsResources.Localization.GetString(Choose(Fields!DetectionSource.Value,"DetectionByUser","System","Realtime","IOAV","NIS","BHO","ELAM","LocalAttestation","RemoteAttestation","AMSI","UAC"), User!Language)
but then i dont have acces to Visual Studio as iam database person.. so cant create DLL and include in reference of report.
Please help me out how to find numeric values to each one of these.
From the statement SrsResources.Localization.GetString, I am guessing that you're using SCCM since that exact statement is part of the SCCM report:
Endpoint Protection -> Endpoint Protection - Hidden -> Computer malware list
If that's the case, then just copy the report and change what you need and the function will work.
Because in the report properties the srsresources.dll is referenced as SrsResources, culture=neutral, the dll is needed in order to translate the value to the correct name in the language the user running the report is using.
If you're just interested in the numeric values behind each entry, however, then it is just a list starting with one. Meaning:
"DetectionByUser",
“System",
“Realtime",
“IOAV",
"NIS",
"BHO",
"ELAM",
“LocalAttestation",
"RemoteAttestation",
"AMSI",
"UAC"

B&R Automation Studio transfer post event

Is there any way to execute a post project transfer event when transferring a project to a PLC?
I want to automatically change the value of a variable using fx the PVI interface every time I do a transfer.
I am not entirely sure what the usecase is for this. However the easiest way for some kind of post transfer script would be to utilize the Runtime Utility Center (RUC).
In the RUC, you can define instruction lists for a B&R PLC with an online connection. This includes instructions for transferring projects and setting values of process variables (PVs).
For transferring the project with RUC, you need to create a RUC package. This can be done under Settings/Export to Runtime Utility Center. You could also do this from the command line. More details in the help under Project management/Project installation/ Performing project installation/Export RUC Guid: cfe34190-f436-4c14-b06d-3a4ca39be7e7
This will create a zip, which you can then use in your RUC. For transfer command there is a wizard which activates when you double click on the command Transfer to target under Project installation The result is a line in the instruction list, which might look like this:
Transfer "C:\path\to\your\zip\project.zip", "InstallMode=Consistent InstallRestriction=AllowUpdatesWithoutDataLoss KeepPVValues=1 ExecuteInitExit=1"
After transferring you can write your PV. Under Process variable functions in the RUC you can find the command Write process variable. Also here there is a wizard and the result looks like this:
WriteVariable "taskname\VariableName", "USINT", "2"
I am using AS 4.4.6. There might be slight differences when using a other version.

Wrong encoding in R presentation

I've struggling a lot with this problem since last week: I am using R presentation (.Rpres file) for the first time and it started alright, meaning that I could build a slide and visualize the result in the Presentation tab in RStudio. However, for reasons I don't understand, after a few hours of working on my presentations the Presentation tab began to show weird symbols for all the french characters in my presentation. The only way so far I could get the presentation back to showing the right characters was by playing with the "Save with encoding..." and "Reopen with encoding..." options in Rstudio.
The problem is that although this has made the french characters in the presentation look good, it is now the text in the source file (.RPres) that looks all weird (e.g. "température" instead of "température").
Here is some more details on my setup, if this can help:
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=French_Canada.1252 LC_CTYPE=French_Canada.1252 LC_MONETARY=French_Canada.1252
[4] LC_NUMERIC=C LC_TIME=French_Canada.1252
attached base packages:
[1] graphics grDevices datasets stats utils methods base
other attached packages:
[1] readxl_0.1.1 sp_1.2-2 foreign_0.8-66 data.table_1.9.6 dplyr_0.4.3 bit64_0.9-5
[7] bit_1.1-12 RPostgres_0.1 DBI_0.3.1.9008 Rcpp_0.12.3.2
loaded via a namespace (and not attached):
[1] lattice_0.20-33 assertthat_0.1 chron_2.3-47 grid_3.2.3 R6_2.1.2 magrittr_1.5
[7] tools_3.2.3 parallel_3.2.3
I really hope someone will find a solution to this as I like this tool and would like to keep using i in the future. I was thinking of trying the revealjs package as an alternative to fix my problem but I haven't (not sure I won't have the same problem).
Thanks for your help.
This problem might be related to the locale specified for your computer, as explained here: https://superuser.com/questions/655273/r-locale-setting-problems-on-mac-os-x
If the result of system("locale") contains a lot of values "C", then you should try the command
system("defaults write org.R-project.R force.LANG en_US.UTF-8")
After this, you should restart R and use system("locale") to check that the locale has been updated, and hopefully you should now be able to get the correct characters the next time you compile your document.
Note: I know that this strategy has solved a similar problem for users on Linux and OS X, but I don't know if it also works if your OS is Windows.

Obtaining Solaris Device path

I am working on Solaris 12 and I am trying to get device path like this:
/pci#0,0/pci108e,4856#1f,2:devctl
I could obtain the this path through CLI using prtconf -v. How could I obtain the path through api using C function? I tried serveral functions in libdevinfo, such as di_devfs_path, but it didn't give the same path as the prtconf gives me. Should I use functions like di_node_name, di_instance, di_binding_name to get pieces of information and construct the path by my own. Or there is a function to get the whole device path?
Thanks.
Firstly, unless you're working for Oracle in the Systems division, you're not working on Solaris 12. (If you are working for Oracle, why haven't you asked
Oracle internal mailing lists for help?)
Secondly, the :devctl node is a minor for the device, so you'll need to walk the minor nodes using di_walk_minor() and check di_minor_name() to see if it matches your criteria.
Finally, yes, this should work on Solaris 10 and later.

list elements by activity

I'm working on automated builds and need to be able to list elements that were worked on under particular activities. I'm new to ClearCase so I apologise for naiivety ...
My downstream build process works fine and I now need to populate a 'pre-build' area by identifying the (checked-in) files associated with one or more activities, labels etc (in fact any combination the change/release manager wants) by listing the candidate files for a build and then copying them from the M: drive (Windows). We are using CC 7.1 with a back end on AIX and Win XP Pro desktops. We'll use ccperl to drive the find+copy process.
I have battled with 'find' to no avail - can someone lend a hand? All help gratefully received.
Cliff.
For "label" (I suppose "UCM Baselines" since you mention "activities", which exist only with UCM):
The easiest way would be to configure a config spec for a dynamic view:
element * MY_BASELINE
in order to quickly access the right files.
For activities, you could (if there is not too much files involved), list the exact versions of each activities you want:
cleartool descr -l activity:my_actity#\pvob
and parse the result to grep/awk only what you need.
You need only to do this within a dynamic view (any dynamic view): the activity will contain a list of extended pathnames, meaning you will be able to access and copy each version through that myFile##/main/myBranch/myVersion path.