PCSDK loading .modx to omnicore robot
Tompanhuhu
✭✭
Hi I'm not able to load a module with the extension .modx to a omnicore robotcontroller.
The PCSDK returns an error it must be a .sys or .mod file, but when I upload the module as .mod the encoding is a mess. Any workarounds?
The PCSDK returns an error it must be a .sys or .mod file, but when I upload the module as .mod the encoding is a mess. Any workarounds?
Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group
0
Comments
-
I attach a screenshot of the exception dialog.
Omnicore has implemented a new module extension for UTF-16 encoding?
.modx
When I upload a module with .mod extension the encoding is messed up.
When i then unload that module from the robotcontroller it's saved as a .modx?
@NilsOlofsson
You seem engaged in issues can you give any feedback if this issue is being investigated?Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0 -
Have you tried this in the new PC SDK 2021.1.1 that became available today? at:
https://developercenter.robotstudio.com/
—Nils OlofssonPC Software Support Engineer0 -
NilsOlofsson said:Have you tried this in the new PC SDK 2021.1.1 that became available today? at:
https://developercenter.robotstudio.com/
Can you help me with how to path to the file that's stored in the robot HOME catalog should be pointed out?
This is my codestring home = controller.GetEnvironmentVariable("HOME"); controller.Rapid.GetTask("T_ROB1").LoadModuleFromFile(home + $"/m_asd.modx", ABB.Robotics.Controllers.RapidDomain.RapidLoadMode.Replace);
Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0 -
Hello there,
This is a bug in RS2021.1 that affects loading modules both via RobotStudio and PC SDK.
I will post an update when R&D provides a target release for a fix.Post edited by Maxim Riabichev on—Maxim RiabichevPC Software Support Engineer0 -
Maxim Riabichev said:Hello there,
This is a bug in RS2021.1 that affects loading modules both via RobotStudio and PC SDK.
I will post an update when R&D provides a target release for a fix.
Please ping me at the forum when a fix is available, i would appreciate it.Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0 -
@Tompanhuhu can you try making the full path look like this "HOME/m_asd.modx" and see if you get an exception?—Maxim RiabichevPC Software Support Engineer0
-
Maxim Riabichev said:@Tompanhuhu can you try making the full path look like this "HOME/m_asd.modx" and see if you get an exception?
But I still have encoding issues. When the file is encoded as ANSI:
The original module:MODULE m_ads !Detta är en modul !1234567890 !ÅÄÖ !== ?? "" !! ENDMODULE
Module loaded to the robotcontrollerMODULE m_ads !Detta �r en modul !1234567890 !��� !== ?? "" !! ENDMODULE
When the file is encoded in UTF-8 it's not possible to upload it to the robotcontroller.
I get this error msg:
Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0 -
Okay, thanks for checking.
I will look into the encoding issue tomorrow.—Maxim RiabichevPC Software Support Engineer0 -
@Tompanhuhu what RW are you running on the controller?
—Maxim RiabichevPC Software Support Engineer0 -
Maxim Riabichev said:@Tompanhuhu what RW are you running on the controller?Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0 -
@Tompanhuhu
I just tried to reproduce the issue you're experiencing but was unable to do so.
I created a testModule.modx in Notepad++ with Encoding set to UTF-8.
Then, based on my PC SDK Sample app available here https://bitbucket.org/mawkes/pcsdk/src/PCSDK_2021.1.1/ I modified MainWindow.xaml.cs to look like this:private void ComboBox_Tasks_SelectionChanged(object sender, SelectionChangedEventArgs e){Application.Current.MainWindow.Width = 750;StackPanel_TaskControl.Visibility = Visibility.Visible;ComboBox_Modules.Visibility = Visibility.Visible;var comboBoxTasks = sender as ComboBox;AppControllerData.SelectedTask = comboBoxTasks.SelectedItem as Task;AppControllerData.Modules?.Clear();AppControllerData.RapidVariables?.Clear();if (AppControllerData.SelectedTask != null){string fullPath = "HOME/";using (Mastership master = Mastership.Request(AppControllerData.SelectedController)){try{AppControllerData.SelectedTask.LoadModuleFromFile(fullPath + "testModule.modx", RapidLoadMode.Replace);master.Release();}catch (Exception ex){MessageBox.Show("Unexpected error occurred: " + ex.Message);}}}else{return;}AppControllerData.Modules = AppControllerData.SelectedTask.GetModules().ToList();}
Running a 7.2RW VC, I placed the file in the HOME directory of the controller.
I then started my little PC SDK app example in VS, selected the task T_ROB1 and the file got transferred to the task under name m_ads with the content looking UTF-8 encoded:
Post edited by Maxim Riabichev on—Maxim RiabichevPC Software Support Engineer0 -
@Maxim Riabichev
Hi I just tried to save a module directly from the robotcontroller as .modx and then reupload it back to the controller with PCSDK and the encoding seems to be correct.
Thank you for handling this issue so quickly.
Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings