Running structured text files in Raspberry pi 3 - terminal

I have my raspberry pi3 and I did a small basic code in a text editor in structured text language. I don't know how to run the code in the terminal. I'm running OPEN PLC in raspberry pi. So there should be some way to run the structured text language code within the terminal.
Any suggestions would be helpful.
I have saved the file in .st extention which seems to be the extension for the structured text file. When I type the filename.st in a terminal, it says command cannot be executed.
The error message when I try to run the code, it says command cannot be executed. I would like to know how to compile and run the file ( in .st Extention) in the terminal.

None of the controllers ever run ST code directly. Before it gets to the plc it is compiled at least to С or even Machine code. So you cannot run your ST file directly. The only ways are.
You can use logi.CAD3. There is instruction on how to install RT on pi. In this case, you can use PI like a PLC and logi.CAD3 like IDE where you can write ST program.
Use CoDeSys. ерун have PI runtime too. But it cost money per license. Install it and Codesys will be IDE for PI.
Use OpenPLC Runtime and IDE. This will allow you to upload ST file on your PLC (Raspberry Pi)

Related

how to code read or copy protect of micropython application code from ESP32 device

i have develpped an iot application using the micropython (my custome .py file). and uploaded to ESP32. i am looking of the way how i can privent other users to steel or copy my code are view my coder from the esp32 flash.
i try to buiild binary i could not sucessfull .
can some one hlep on this
i thry to convert py file to mpy file and some issue in esp32 to run the applicaiton . try to build custom binary (i am not able find good procedure for the same , for building applicaiton with main.py with other files and configuration)
One option (as you already mentioned) would be to convert your application to machine code by using MPY-CROSS. Compile it yourself or from https://github.com/robert-hh/Shared-Stuff use tool MPY-CROSS.exe (if you are on windows) to convert your *.py to *.mpy.
When converting- check what exact mpy-cross parameters you need to use according to your hardware.

ncurses in Haskell for Windows

I've written a program in Haskell that's going to be run on a Windows 7 machine. It's not my machine. I don't get to choose the OS.
It's been written using the ncurses package, and compiles just fine on my (Ubuntu) machine. Unfortunately, it won't compile on Windows, even under Cygwin. It gives me a very unhelpful error (Process exited with code: ExitFailure 1) when it tries to build the ncurses package.
I've tried specifying the exact locations of the header and dll files for ncurses to no avail.
Is there anything I can do, short of re-writing the software to use a different package?
In hindsight, I should've checked that it would compile under Windows some time ago, but since I've successfully used ncurses in C on Windows in the past, I had no reason to believe it wouldn't work.
My current code is available on GitHub.
Edit: If I were to re-write the IO parts using something else (as an absolute last resort) I would need to be able to do the following things:
determine the number of rows and columns in the terminal
be notified if the terminal is resized
be notified when a key is pressed (including arrow keys and function keys, without line buffering)
control the position and visibility of the cursor
disable echoing of standard input
change text/background colour
...and I would need to be able to do these things in both Windows and Linux.

Show traces on mac terminal

I'm trying to use the Atom IDE to make some Haxe project on my new Mac (as a Windows user, I'm discovering this world), and I install the package "haxe" to do this. Until there, all is perfect (great jobs to them \o/), and I can compile an swf :).
But I have a little problem, even with the "-debug", all my traces are in the swf, not on the output console (terminal if I run from it, or output panel on Atom). Maybe I've forget to do/install/init something ?

chdir not working on Spartan 6 SP605 FPGA

I am working on a project that uses the Spartan 6 FPGA eval kit.
The problem I am having is that when trying to change the directory on the CF card, the software can't build the working stack.
The directory is "a:\\setup" and that is being passed to the sysace_chdir(const char *path) function.
When I try to add some print code to debug the problem, none of the changes are registered.
In the SDK, I have the MicroblazeProc_hw_platform, then my project, then a standalone_bsp_0 project, which has the sysace_chdir() function in it.
When I build all the projects, the simple print statements (I use xil_printf() for output) do not display in the output.
Any help would be great.
PS - I am connected to the FPGA in the SDK using a COM port, and other print statements do get output during the initialization of the other things like the UARTs, so this is not a problem with output to the terminal or anything.
I think I figured out what the problem was.
I inserted my card into a USB card reader and formatted it using a FAT32 file system.
As for the cnages in the BSP, I was not able to figure that out, but the code is now able to change directory.
The wierd thing is that after the code is executed, if I pull out the CF card and insert it into my pc, I don't see the newly created directory. I don't know why.

Test assembly code on a mac

A while back I was following some tutorials an assembly. I was running it all on a windows machine, compiling with NASM and then writing the compiled code to a floppy disk, then reboot and try the code. This process was long and time consuming and sadly was not on a mac. When I found out that Xcode for mac installed NASM I immediately tried to compile some code. The code compiled fine. The issue is testing it. On a mac I have no floppy (not like I want to use one) so Im not sure how to test this. I looked in to Q (kju) and found it would only emulate things on an ISO file. So I guess what Im asking is is it possible to install the compiled code on an ISO file for testing? (Note: the code when compiled forms a .bin file)
Thanks for any help
I don't know exactly what you are trying to test (a boot loader maybe?) but you don't need to reboot or boot from a disk just to run assembled code (unless it is a boot loader or something).
Either way, if you need to "reboot" to test, I suggest running an emulator. Sun VirtualBox is super easy to use and free and emulates a standard x86 architecture (including floppy drives)! So that may work for you in the short term. If you ever want to create an ISO image in the future, you can do that with the command line utility hdiutil. In a terminal window, type man hdiutil or visit the online man page for more information on using that to create all kinds of disk images.

Resources