Posts

Showing posts with the label Notes

TwinCAT - Troubleshoot Issues of TwinCAT 3

1. VirtualBox error and real-time configuration As soon as a component of the computer uses Hyper-V, only the engineering environment (XAE) can be used on this computer, not the runtime environment (XAR). The VT-x-CPU function is mandatory with 64-bit operating systems (must be enabled in BIOS and be available). To release CPUs to TwinCAT real-time operation, users should run: msconfig Leave one or more CPUs for the operation. Reboot is needed. Note that hard real-time operation is supported only on Intel Ethernet controllers. 2. 'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >>AdsWarning: 4115 (0x1013, RTIME: system clock setup fails. Run: C:/TwinCAT/3.1/System/win8settick.bat Reboot is needed. 3. AdsWarning 1823 LAN adapters need to install "TwinCAT RT-Ethernet Filter Driver" from Windows control panel or TwinCAT settings. 4. ESI files, also called XML description, need to be ...

Cygwin - Troubleshoot Issues of Installing Kaldi on Cygwin

1. Files are too big. Enter the following command before configure in kaldi/src: export CXXFLAGS=”-O3” 2. OpenFst error After install tools, install openfst 1.6.7 in kaldi/tools again. Append option "--fst-root=" and location of openfst in /usr to ./configure. 3. Replace Intel MKL with OpenBLAS. By appending "--mathlib=OPENBLAS" to ./configure, use OpenBLAS instead of Intel MKL.

Linux - BeagleBone Black

These methods are tested on bone-debian-9.9-iot-armhf-2019-08-03-4gb.img with kernel 4.14.108-ti-r113. 1. Development tools: Image writer: Win32 Disk Imager SSH client: Putty File manager: WinSCP 2. Wifi (BeagleBone Black Wireless): Connect wifi. connmanctl enable wifi scan wifi services agent on connect <ID of network which is next to name of wifi> <Password of wifi> quit Remove auto-connect. connmanctl config <ID> auto-connect off quit Check whether it connects. timeout 1 ping 8.8.8.8 3. USB network (BeagleBone Black): Open Windows control panel and go to network adapter setting. Share network of computer with the board. Make network adapter of the board get IP address AUTOMATICALLY. Create file named resolv.conf with the following content. domain localdomain search localdomain nameserver 8.8.8.8 nameserver 8.8.4.4 Create shell script with the following content and execute the script. echo temppwd | sudo -S...

C - We Should Never Use Function Sizeof to Calculate Size of a Pointer Which Points to String

Code: #include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { char arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; char *str = "1234567890"; printf("Size of arr is %d\n", sizeof(arr)); printf("Size of *arr is %d\n", sizeof(*arr)); printf("String length of arr is %d\n", strlen(arr)); printf("Size of str is %d\n", sizeof(str)); printf("Size of *str is %d\n", sizeof(*str)); printf("String length of str is %d\n", strlen(str)); return 0; } Output: Size of arr is 10 Size of *arr is 1 String length of arr is 9 Size of str is 8 Size of *str is 1 String length of str is 10

CoppeliaSim - Keyboard Input, Status Bar, Console Window, and Nil

Image
According to http://www.forum.coppeliarobotics.com/viewtopic.php?f=9&t=1751 and http://www.forum.coppeliarobotics.com/viewtopic.php?f=9&t=5299 in CoppeliaSim forum, we can know that string.byte('A') represents character 'A' and auxiliaryData[1] stores keyboard input of simGetSimulatorMessage(). The dialog at bottom of CoppeliaSim is called status bar, while console window is hidden by default. By changing user setting, you can see it. Warning: Closing console window leads to shutting down software CoppeliaSim itself. Use simAddStatusbarMessage(auxiliaryData[1]) to print input message on status bar, then use print(auxiliaryData[1]) to print input message on console window. You can check script of object naked car in folder example to know how to deal with keyboard input. For function reference, visit http://www.coppeliarobotics.com/helpFiles/en/apiFunctions.htm#simGetSimulatorMessage . Sometimes functions return value nil which means nothing. It i...

ShareX - Set Up Screen Recorder Step by Step

Image
When you try to find GPL software of screen recording, you may bump into one called CamStudio on SourceForge. Unluckily, for some reason, some people can't use them record video with sound and its environment setting is complicated. I can't, either. 😕 Fortunately, I found this one after fail on CamStudio. It's ShareX that also use GPL. Here I gonna teach you how to set up the environment for screen recording. 1. First, go to "Task settings"→"Screen recorder"→"Screen recording options". 2. Second, click "Download" and click "Install recorder devices". 3. Third, refresh and choose "GDI grab" in video source and "virtual-audio-capturer" in audio source. Do not choose "screen-capture-recorder" because it may cause incorrect position of cursor during recording for some reason. 4. Lastly, the key point is here. The ffmpeg file you installed previously would probably NOT work. Yo...