What version of TURBOVISION do I need and where to get it?
I tried to compile, but make showed errors about a header file named String.h
Why isn't there the usual ./configure ?
Why isn't there an install script ?
I start VISUAL and get no screen display.
I start VISUAL and get a lot of messages.
What command line options supports VISUAL.
I start VISUALD and it seems to do nothing.
Why do you use a spreadsheet and not a database ?
Can I use the HMI pages/HMI viewer with servers other than VISUAL ?
How do I create a new/empty spreadsheet ?
How do I realize large applications with multiple identical components ?
Can I (safely) operate my machinery over internet ?
Q: What version of TURBOVISION do I need and where to get it?
- A: I used libtvision that came with SuSE 7.2. I recommend to load it down from
SuSE's ftp server.
It seems that SuSE does not further distribute it with 8.0 (and greater?).
There is at least one more version named rhtvision. I never tried it out.
Q: I tried to compile, but make showed errors about a header file named String.h
- A: I used libg++. libg++, according to SuSE's description was the standard C++ library from GNU.
It was there before libstdc++ came into life. It is not recommended for new projects.
I apologize for using out of date lib's but when I tried out both, I found lg++ easier do
handle and the final code (stripped) is about 75% of what the use of libstdc++ results in.
And so I still find it apropriate with regard to embedded systems. You can do without libg++.
to do so undefine use_string_2 in Makefiles and remove lg++ from linker input.
From version 0.0.17 libstdc++ will be the default.
Q: What do I need to build VISUAL ?
- A: I'm not quite sure.
I use gcc 2.95.3, gcc 3.x.x did not do.
For visual (with spreadsheet editor), you need TURBOVISION
This is what ldd says about the library depedencies:
You can build visuald without TURBOVISION.
- libtvision.so.0 => /usr/lib/libtvision.so.0 (0x40028000)
- libncurses.so.5 => /lib/libncurses.so.5 (0x400a6000)
- libgpm.so.1 => /usr/lib/libgpm.so.1 (0x400f1000)
- libg++-libc6.2-2.so.3 => /usr/lib/libg++-libc6.2-2.so.3 (0x400f7000)
- libpthread.so.0 => /lib/libpthread.so.0 (0x4013f000)
- libdl.so.2 => /lib/libdl.so.2 (0x40155000)
- libc.so.6 => /lib/libc.so.6 (0x40159000)
- libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x40276000)
- libm.so.6 => /lib/libm.so.6 (0x402bf000)
- /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Q: Why isn't there the usual ./configure ?
- ./configure is used to support multiple platforms. Currently this aims at LINUX on i386 only.
- I hope that the rest of headers and capabilities is the same on each LINUX distro.
- To be honest, I also never learned to use autoconf & friends.
- From version 0.0.17 there is one.
Q: Why isn't there an install script ?
- A: I find it more convenient to keep the whole stuff below one directory and
to run it from there. In this way I can keep several development versions.
If I would install to say /usr/local/bin, they would overwrite each other.
Same with configuration in /etc or shared objects in /usr/local/lib/visual
Q: I start VISUAL and get no screen display.
- A: The TURBOVISION library wants to write to /dev/vcsa[console number]. This is
ok, if you are root. To run it as from a normal user account, do (as root)
>chmod 666 /dev/vcsa[the console number you use] (normally 1 to 6).
Q: I start VISUAL and get a lot of messages.
- A: This is for debugging. Redirect it to /dev/null if you don't want to see it or to some file.
Q: What command line options supports VISUAL.
- A: None. The configuration is in the file visual.cfg. This is
must be inthe directory you start VISUAL from. visual.cfg can be a symbolic link
to a another file containing the specific configuration for a project.
Q: I start VISUALD and it seems to do nothing.
- A: VISUALD is a daemon version intended to run without a controlling terminal.
Today, it can be used to run an application set up with VISUAL before.
When the spreadsheet editor applet sheetView is operative, you will be able to
edit spreadsheets over the net.
Q: Why do you use a spreadsheet and not a database ?
- A: I want to provide easy access to formulas.
You will always have things like this: A PLC reads 0-4095 from an analog input corresponding
to a pressure of 0 to 10 bar or psi.
Let's have a look where this calculation could be done in a possible design based on data base:
1. In the PLC program. Drawback: cycle time, many PLCs cannot handle floating point.
2. In the PLC driver. Drawback: each driver needs that code.
You would also need a debugging tool that shows whether an error occured in
communication or in calculation.
3. In stored procedures or in the SELECT statements. Drawback: Calculation would be executed each time the data is fetched.
Calculation load would increase with the number of clients.
4. In the HMI pages. Drawbacks: Each client has to do the calculation.
If multiple pages need the same calculated value, you would have to put the
formula in each page definition. You may also want the calculation results for alarm messages
or trend recording whether a HMI page is shown or not.
If you want to put your data in a database, there is the log_mysql.so data logger, which
can store to that data base. You may also consider the combination:
VISUAL+PLC driver+log_mysql as a modular implementation of point 2.
Q: Can I use the HMI pages/HMI viewer with servers other than VISUAL ?
A: In principle: yes. The hmiViewer applet loads the class given by the parameter
"communicator" as a plugin and uses this to do the actual communication. You would have to write
your own class hmiXXXXCI that implements hmiCommunicationInterface.
Currently, a working CI is hmiModbusCI.java.
This needs the open source JAVA Modbus protocol implementation from
the JAMOD project.
Another CI (not yet ready) is hmiSimaticCI.java.
This needs some beans from Siemens to communicate to their CP 341-IT communication
Q: How do I create a new/empty spreadsheet ?
A: For a new sheet, press plus key in the spread sheet window.
When you have reached the last sheet, you will be asked whether to create a new one.
Confirm and save the empty sheet- Hint: Your working directory must contain one
sheet in file 1.sht (may be empty) or VISUAL will abort.
Q: How do I realize large applications with multiple identical components ?
A: With spreadsheets: If you want multiple of these components in the same HMI page,
you can use Mark/Copy range functions. If it is for multiple plants or
large components, consider to use a sheet for each. Just copy the sheet file to a higher number
(1.sht->2.sht) and restart.
With HMI pages: put your widget definitions in an extra file, include it multiple times in a PHP
script and let PHP do coordinate shifting as necessary.
Q: Can I (safely) operate my machinery over internet ?
A: The client/server protocol is simple and text base. So if the computer
connected to a PLC can be accessed from the internet, anybody could connect to it.
A telnet client could be sufficient to switch off your machine(s) or to manipulate their settings.
Using a more complicated protocol doesn't help as anybody can get the source code.
Integrating security measures into VISUAL is no good idea, as they would allways be behind what
special security software offers.
So consider to use virtual private networks (VPN) or to tunnel VISUAL's client/server protocol
over SSH. I'm no expert to these areas and should welcome hints on this.