Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

pvbrowser · process visualization hmi/scada

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 221
  • Category: Web Browsers
  • Founded: May 18, 2008
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 1632 - 1661 of 2237   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1632 From: "landratte71" <landratte71@...>
Date: Sat Mar 3, 2012 9:25 am
Subject: Bugreport: problems with xAxis and yAxis on QDrawWidget
landratte71
Send Email Send Email
 
Hello,

I'm drawing charcteristics using a QDrawWidget.
Depending on the value range I get overlapping text for xAxis and yAxis.

I think the the static function "beautyval"  in the file QDrawWidget.cpp is not
working properly!

I changed the variable "floatFormat" to "%.1f", so beautyval is not applied
anymore!

ciao
landratte

#1633 From: "pvbrowser" <pvbrowser@...>
Date: Sat Mar 3, 2012 10:53 am
Subject: Re: Bugreport: problems with xAxis and yAxis on QDrawWidget
pvbrowser
Send Email Send Email
 
> I'm drawing charcteristics using a QDrawWidget.
> Depending on the value range I get overlapping text for
> xAxis and yAxis.
>
> I think the the static function "beautyval"  in the file
> QDrawWidget.cpp is not working properly!
>
> I changed the variable "floatFormat" to "%.1f",
> so beautyval is not applied anymore!

Thank you for the report.
I will review the function.

Always printing only 1 digit behind the . might not be OK for everyone.

#1634 From: "pvbrowser" <pvbrowser@...>
Date: Sat Mar 3, 2012 11:25 am
Subject: Re: Bugreport: problems with xAxis and yAxis on QDrawWidget
pvbrowser
Send Email Send Email
 
Please try if this code at the end of beautyval would be ok for you.

     while(i>0)
     {
       i--;
       if(text[i] == '0') text[i] = '\0';
       else if(text[i] == '.')
       {
         text[i] = '\0';
         return 0;
       }
       else
       {
         if(strchr(text,'.') != NULL)
         {
           float fval = atof(text);
           if     (fval >  9.99f) sprintf(text,"%.1f", fval);
           else if(fval < -9.99f) sprintf(text,"%.1f", fval);
         }
         return 0;
       }
     }

#1635 From: "oceancalmcool" <yizhang.018@...>
Date: Sun Mar 4, 2012 7:01 am
Subject: Re: Pvbrowser using MODBUS for data aquisition
oceancalmcool
Send Email Send Email
 
Hi Master,

Thank you for your help.
When i have ready modbusdaemon program, i have found error of have not ttyS0
device.

[root@EmbedSky /root]# ./modbusdaemon
could not open serial device /dev/ttyS0

I guess in my embedded linux system has not ttyS0 device, so need i
reconfigurate modbusdaemon or write another tty kernel module in linux using for
modbusdaemon?

--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
>
>
> > Another question:
> >
> > if I have two serial ports will connect two temperature sensor,
> > will i need two daemons for these two sensors data aquisition.
> Yes
> But normally you will use a RS232/RS485 converter and attach all remote modbus
devices on the twisted pair wires. (fieldbus == modbus and modbus := 1 master
polling N slaves)
>
> > By the way, in my embedded linux system image, i have no
> >
> > shared_memory=/srv/automation/shm/modbus.shm
> > mailbox=/srv/automation/mbx/modbus.mbx
> >
> > if i only mannually generate this files, is it all right ?
> You will have to create the directories manually.
> The files will be created automatically when you start the daemon.
> The above files are in unix syntax.
> On Windows you would have to use something like
> shared_memory=c:\automation\shm\modbus.shm
> mailbox=c:\automation\mbx\modbus.mbx
>
> Tip: read about "sharedmemory" and "mailbox" IPC mechanisms in wikipedia.
>

#1636 From: "landratte71" <landratte71@...>
Date: Sun Mar 4, 2012 9:06 am
Subject: Re: Bugreport: problems with xAxis and yAxis on QDrawWidget
landratte71
Send Email Send Email
 
input: 123.99
output: 123.98173 (not ok)

input: 123.998
output: 124.0 (ok)

input: 0.7898
output 0.7898 (not ok)

input: 12.45
output: 12.4 (not ok)

input: 12.46
output: 12.5 (ok)

--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
>
>
> Please try if this code at the end of beautyval would be ok for you.
>
>     while(i>0)
>     {
>       i--;
>       if(text[i] == '0') text[i] = '\0';
>       else if(text[i] == '.')
>       {
>         text[i] = '\0';
>         return 0;
>       }
>       else
>       {
>         if(strchr(text,'.') != NULL)
>         {
>           float fval = atof(text);
>           if     (fval >  9.99f) sprintf(text,"%.1f", fval);
>           else if(fval < -9.99f) sprintf(text,"%.1f", fval);
>         }
>         return 0;
>       }
>     }
>

#1637 From: "pvbrowser" <pvbrowser@...>
Date: Sun Mar 4, 2012 11:32 am
Subject: Re: Pvbrowser using MODBUS for data aquisition
pvbrowser
Send Email Send Email
 
> Hi Master,
This title is really not necessary.

> When i have ready modbusdaemon program, i have found error of
> have not ttyS0 device.
>
> [root@EmbedSky /root]# ./modbusdaemon
> could not open serial device /dev/ttyS0
>
> I guess in my embedded linux system has not ttyS0 device,
> so need i reconfigurate modbusdaemon or write another
> tty kernel module in linux using for modbusdaemon?
The serial devices are probably called
/dev/ttyXXX
You have to figure out, what the according tty is called on your system.
Then you edit the INI file and insert the name there.

Another reason might be that a normal user is not allowed to open the tty.
Try running modbusdaemon as root.
If this works it will be a good idea to make the user a member
of group "dialout".

#1638 From: "pvbrowser" <pvbrowser@...>
Date: Sun Mar 4, 2012 12:48 pm
Subject: Re: Bugreport: problems with xAxis and yAxis on QDrawWidget
pvbrowser
Send Email Send Email
 
Oh, in our pvslib there is already a function to influence the float format used
for labels.

//after
   gBeginDraw    (p, id);
//call something like
   gSetFloatFormat(p, "%.2f");

But nevertheless i have made beautyval now very simple:
static int beautyval(char *text)
{
   char *cptr = strchr(text,'.');
   if(cptr != NULL)
   {
     char *end = cptr + strlen(text) - 1;
     while(end != cptr) // eliminate trailing 0
     {
       if     (*end == '0') { *end = '\0'; }
       else if(*end == '.') { *end = '\0'; break; }
       end--;
     }
   }
   return 0;
}

You can find the updated version within the git repository.
There is also a small modification for the default floatFormat.

#1639 From: "pvbrowser" <pvbrowser@...>
Date: Sun Mar 4, 2012 1:05 pm
Subject: Re: Bugreport: problems with xAxis and yAxis on QDrawWidget
pvbrowser
Send Email Send Email
 
This had been to quick.
The code is now as follows.
Within the last post there was a bug.

static int beautyval(char *text)
{
   char *cptr = strchr(text,'.');
   if(cptr != NULL)
   {
     char *end = cptr + strlen(cptr) - 1;
     while(end != cptr) // eliminate trailing 0
     {
       if     (*end == '0') { *end = '\0'; }
       else if(*end == '.') { *end = '\0'; break; }
       else                 { break; }
       end--;
     }
     if(cptr == end) *cptr = '\0';
   }
   return 0;
}

#1640 From: "oceancalmcool" <yizhang.018@...>
Date: Mon Mar 5, 2012 1:25 am
Subject: Re: Pvbrowser using MODBUS for data aquisition
oceancalmcool
Send Email Send Email
 
Thanks for your reply

I think it is not because i did not use root user for open tty device.
Maybe i will change device name in INI file and try again.
And I can chang configurate file for daemon module:
As follow file, i can change tty=/dev/ttyS0 to tty=/dev/ttyXXX,

Is it all right?
############################################
# Project file for generating modbusdaemon #
# mkmodbus name.mkmodbus                   #
############################################
shared_memory=/srv/automation/shm/modbus.shm
mailbox=/srv/automation/mbx/modbus.mbx
communication=serial
tty=/dev/ttyS0
baudrate=9600
rtscts=1
parity=0   # 0=NONE 1=ODD 2=EVEN
protocol=0 # 0=RTU  1=ASCII
#communication=socket
tcpadr=lehrig2
tcpport=502
#eventlog host=localhost port=6000
# function := 1=ReadCoilStatus | 2=ReadInputStatus | 3=ReadHoldingRegisters |
4=ReadInputRegisters
#             1 coil per bit   | 1 input per bit   | 2 byte per register    |
2byte per register
cycle1 slave=1 function=1 start_adr=0 num_register=3
cycle2 slave=2 function=2 start_adr=0 num_register=3
cycle3 slave=3 function=3 start_adr=0 num_register=3
cycle4 slave=4 function=4 start_adr=0 num_register=3
cycle5 slave=5 function=2 start_adr=0 num_register=3
cycle6 slave=6 function=2 start_adr=0 num_register=3
cycle7 slave=7 function=2 start_adr=0 num_register=3



--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
>
>
> > Hi Master,
> This title is really not necessary.
>
> > When i have ready modbusdaemon program, i have found error of
> > have not ttyS0 device.
> >
> > [root@EmbedSky /root]# ./modbusdaemon
> > could not open serial device /dev/ttyS0
> >
> > I guess in my embedded linux system has not ttyS0 device,
> > so need i reconfigurate modbusdaemon or write another
> > tty kernel module in linux using for modbusdaemon?
> The serial devices are probably called
> /dev/ttyXXX
> You have to figure out, what the according tty is called on your system.
> Then you edit the INI file and insert the name there.
>
> Another reason might be that a normal user is not allowed to open the tty.
> Try running modbusdaemon as root.
> If this works it will be a good idea to make the user a member
> of group "dialout".
>

#1641 From: "oceancalmcool" <yizhang.018@...>
Date: Mon Mar 5, 2012 5:53 am
Subject: Re: Qwt library can not using in ARM
oceancalmcool
Send Email Send Email
 
Sorry for late for this replay, but qwt library can not use in qwt, is very
strange.
--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
>
>
> Some questions:
> > I have tried the method you mention, but i can not still
> > run program with qwt library in Linux OS on Arm.
> What type of Linux OS on Arm do you use?
> Here i have used Maemo and Android already.
> Users reported about different systems also.
> Please tell me more about your hardware and linux distribution.

My hardware is TQ2440, processor is ARMv4, the linux kernel version is 2.6.30 +
qt4.5 version image system.

> > When i have only using arm_linux_gcc compile a qwt library,
> > and only run some example program designed by qwt library,
> > this is not care about pvbrowser,
> > this program can not still run in embedded linux system.
> Did you compile our snapshot or did you compile the original qwt sources?
>
> > For example, i want to design a QwtKnob wedgit,
> > when i use pvserver send QweKnob() function to my browser
> > in embedded linux system, pvbrowser has no any response
> > about it. it is dead, can not display any graphic,
> > and  answer any request still time out.
> Do you have a pvbrowser client running on your Arm platform?
> Does it display the non qwt widgets?
> Try running the pvserver and the pvbrowser client on different systems and
connect them over the network.
> (1) pvserver on Arm and pvbrowser on PC
> (2) pvserver on PC and pvbrowser on Arm
> What is the result?

  pvserver on Arm and pvbrowser on both ARM and PC
1) Without qwt widgets, ARM and PC pvbrowser can display widgets well
2) With qwt widgets, ARM pvbrowser can not display qwt widgets, but PC pvbrowser
can display it well, PC OS is ubuntu 10.4.
I have successfully compile libqwt.a both in ARM and in PC.
This is very strange.
By the way, i have tried qwt code together with pvbrowser, and have download qwt
6.0 source code and using arm_linux_gcc 4.3.3 rebuild qwt 6.0 code. In that
source code directory, i have found some example, i have compiled, in PC can run
it such as dials program, but using arm_linux compilor to make dials, there is
no error happen, but download it to embeadded system, that is can not work again
except a cursor.


> Did you sucessfully build a
> qwt static library libqwt.a
> or did you sucessfully build a
> qwt shared object library libqwt.so
> ?
>

#1642 From: "pvbrowser" <pvbrowser@...>
Date: Mon Mar 5, 2012 7:46 am
Subject: Re: Qwt library can not using in ARM
pvbrowser
Send Email Send Email
 
> > Do you have a pvbrowser client running on your Arm platform?
> > Does it display the non qwt widgets?
> > Try running the pvserver and the pvbrowser client
> > on different systems and connect them over the network.
> > (1) pvserver on Arm and pvbrowser on PC
> > (2) pvserver on PC and pvbrowser on Arm
> > What is the result?
>
> pvserver on Arm and pvbrowser on both ARM and PC
> 1) Without qwt widgets, ARM and PC pvbrowser can display widgets well
> 2) With qwt widgets, ARM pvbrowser can not display qwt widgets, but PC
pvbrowser
> can display it well, PC OS is ubuntu 10.4.
> I have successfully compile libqwt.a both in ARM and in PC.
> This is very strange.
> By the way, i have tried qwt code together with pvbrowser,
> and have download qwt
> 6.0 source code and using arm_linux_gcc 4.3.3 rebuild qwt 6.0 code. In that
> source code directory, i have found some example, i have compiled, in PC can
run
> it such as dials program, but using arm_linux compilor to make dials, there is
> no error happen, but download it to embeadded system, that is can not work
again
> except a cursor.

1) The problem must be within the client
    because you run the server on ARM in both cases.

2) The problem could be a different byte order on ARM and x86.
    But qwt already works on Maemo and Android where ARM is also used.
    Thus the byte order can't be a problem.

3) It could be a problem with a special GCC version but i do not think so.

On Maemo we use GCC on a Ubuntu VM which is cross compiling to ARM code
[sbox-FREMANTLE_ARMEL: ~/maemo-pvb] > g++ --version
sbox-arm-none-linux-gnueabi-g++ (GCC) 4.2.1
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For Android we used
android-lighthouse-4.8.0 GCC for Android

4) You have tried qwt 6.0 and qwt 5.2 we currently use.
    The version should not be the problem
    Please use qwt 5.2 since we have already prooved it works on ARM

-----------------------------------------------------------

Thus i currently do not have a good idea


You said:
> there is no error happen, but download it to embeadded system, that is can not
work again
> except a cursor.
Did you use the static qwt library on the embedded system ?
If you used the dynamic library on the embedded system it might not find the
library ?
Obviously the Qt libraries are found on the embedded system because otherwise
pvbrowser would not work.

I would continue as follows:
1) Create a very small test application that only shows 1 simple qwt widget.
    That is something like:
int main(int argc, char *argv[])
{
   QApplication app(argc, argv);
   QwtSlider test(0,1);
   test.show();
   return app.exec();
}

2) First test it on the PC

3) Test it on the embedded system using the static qwt library

#1643 From: "a_la_wachinwei" <a_la_wachinwei@...>
Date: Mon Mar 5, 2012 8:08 am
Subject: Re: Pvbrowser using MODBUS for data aquisition
a_la_wachinwei
Send Email Send Email
 
Normally you cand find what serial interface you are using by writting the
command "dmesg" in a terminal console, while you are whiring your conection. (it
works for me with an usb-serial converter, but perhaps if it's a pci device you
could simply make a "ls /dev" to find which tty you are using)

Normally are listed as /dev/tty0 , /dev/tty1 , etc... I had not ever seen any
/dev/ttyS0

I hope it helps.
Joa

--- In pvbrowser@yahoogroups.com, "oceancalmcool" <yizhang.018@...> wrote:
>
> Thanks for your reply
>
> I think it is not because i did not use root user for open tty device.
> Maybe i will change device name in INI file and try again.
> And I can chang configurate file for daemon module:
> As follow file, i can change tty=/dev/ttyS0 to tty=/dev/ttyXXX,
>
> Is it all right?
> ############################################
> # Project file for generating modbusdaemon #
> # mkmodbus name.mkmodbus                   #
> ############################################
> shared_memory=/srv/automation/shm/modbus.shm
> mailbox=/srv/automation/mbx/modbus.mbx
> communication=serial
> tty=/dev/ttyS0
> baudrate=9600
> rtscts=1
> parity=0   # 0=NONE 1=ODD 2=EVEN
> protocol=0 # 0=RTU  1=ASCII
> #communication=socket
> tcpadr=lehrig2
> tcpport=502
> #eventlog host=localhost port=6000
> # function := 1=ReadCoilStatus | 2=ReadInputStatus | 3=ReadHoldingRegisters |
4=ReadInputRegisters
> #             1 coil per bit   | 1 input per bit   | 2 byte per register    |
2byte per register
> cycle1 slave=1 function=1 start_adr=0 num_register=3
> cycle2 slave=2 function=2 start_adr=0 num_register=3
> cycle3 slave=3 function=3 start_adr=0 num_register=3
> cycle4 slave=4 function=4 start_adr=0 num_register=3
> cycle5 slave=5 function=2 start_adr=0 num_register=3
> cycle6 slave=6 function=2 start_adr=0 num_register=3
> cycle7 slave=7 function=2 start_adr=0 num_register=3
>
>
>
> --- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@> wrote:
> >
> >
> >
> > > Hi Master,
> > This title is really not necessary.
> >
> > > When i have ready modbusdaemon program, i have found error of
> > > have not ttyS0 device.
> > >
> > > [root@EmbedSky /root]# ./modbusdaemon
> > > could not open serial device /dev/ttyS0
> > >
> > > I guess in my embedded linux system has not ttyS0 device,
> > > so need i reconfigurate modbusdaemon or write another
> > > tty kernel module in linux using for modbusdaemon?
> > The serial devices are probably called
> > /dev/ttyXXX
> > You have to figure out, what the according tty is called on your system.
> > Then you edit the INI file and insert the name there.
> >
> > Another reason might be that a normal user is not allowed to open the tty.
> > Try running modbusdaemon as root.
> > If this works it will be a good idea to make the user a member
> > of group "dialout".
> >
>

#1644 From: "oceancalmcool" <yizhang.018@...>
Date: Mon Mar 5, 2012 8:15 am
Subject: Re: Qwt library can not using in ARM
oceancalmcool
Send Email Send Email
 
I will try it immediately.
Thank you for your support.

--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
>
>
> > > Do you have a pvbrowser client running on your Arm platform?
> > > Does it display the non qwt widgets?
> > > Try running the pvserver and the pvbrowser client
> > > on different systems and connect them over the network.
> > > (1) pvserver on Arm and pvbrowser on PC
> > > (2) pvserver on PC and pvbrowser on Arm
> > > What is the result?
> >
> > pvserver on Arm and pvbrowser on both ARM and PC
> > 1) Without qwt widgets, ARM and PC pvbrowser can display widgets well
> > 2) With qwt widgets, ARM pvbrowser can not display qwt widgets, but PC
pvbrowser
> > can display it well, PC OS is ubuntu 10.4.
> > I have successfully compile libqwt.a both in ARM and in PC.
> > This is very strange.
> > By the way, i have tried qwt code together with pvbrowser,
> > and have download qwt
> > 6.0 source code and using arm_linux_gcc 4.3.3 rebuild qwt 6.0 code. In that
> > source code directory, i have found some example, i have compiled, in PC can
run
> > it such as dials program, but using arm_linux compilor to make dials, there
is
> > no error happen, but download it to embeadded system, that is can not work
again
> > except a cursor.
>
> 1) The problem must be within the client
>    because you run the server on ARM in both cases.
>
> 2) The problem could be a different byte order on ARM and x86.
>    But qwt already works on Maemo and Android where ARM is also used.
>    Thus the byte order can't be a problem.
>
> 3) It could be a problem with a special GCC version but i do not think so.
>
> On Maemo we use GCC on a Ubuntu VM which is cross compiling to ARM code
> [sbox-FREMANTLE_ARMEL: ~/maemo-pvb] > g++ --version
> sbox-arm-none-linux-gnueabi-g++ (GCC) 4.2.1
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> For Android we used
> android-lighthouse-4.8.0 GCC for Android
>
> 4) You have tried qwt 6.0 and qwt 5.2 we currently use.
>    The version should not be the problem
>    Please use qwt 5.2 since we have already prooved it works on ARM
>
> -----------------------------------------------------------
>
> Thus i currently do not have a good idea
>
>
> You said:
> > there is no error happen, but download it to embeadded system, that is can
not work again
> > except a cursor.
> Did you use the static qwt library on the embedded system ?
> If you used the dynamic library on the embedded system it might not find the
library ?
> Obviously the Qt libraries are found on the embedded system because otherwise
pvbrowser would not work.
>
> I would continue as follows:
> 1) Create a very small test application that only shows 1 simple qwt widget.
>    That is something like:
> int main(int argc, char *argv[])
> {
>   QApplication app(argc, argv);
>   QwtSlider test(0,1);
>   test.show();
>   return app.exec();
> }
>
> 2) First test it on the PC
>
> 3) Test it on the embedded system using the static qwt library
>

#1645 From: "oceancalmcool" <yizhang.018@...>
Date: Mon Mar 5, 2012 8:21 am
Subject: Re: Pvbrowser using MODBUS for data aquisition
oceancalmcool
Send Email Send Email
 
Hi Joa,

I think /dev/ttyXXX is virtual device, that is only file description represent
one device. So as you say, when i writting my own connection, i will see some
information from kernel message.

Up till now i have no RS485 device for my testing in embedded system. Later i
will add RS485 device, and using daemon to connect device.

Thank you very much :)

Ocean

--- In pvbrowser@yahoogroups.com, "a_la_wachinwei" <a_la_wachinwei@...> wrote:
>
> Normally you cand find what serial interface you are using by writting the
command "dmesg" in a terminal console, while you are whiring your conection. (it
works for me with an usb-serial converter, but perhaps if it's a pci device you
could simply make a "ls /dev" to find which tty you are using)
>
> Normally are listed as /dev/tty0 , /dev/tty1 , etc... I had not ever seen any
/dev/ttyS0
>
> I hope it helps.
> Joa
>
> --- In pvbrowser@yahoogroups.com, "oceancalmcool" <yizhang.018@> wrote:
> >
> > Thanks for your reply
> >
> > I think it is not because i did not use root user for open tty device.
> > Maybe i will change device name in INI file and try again.
> > And I can chang configurate file for daemon module:
> > As follow file, i can change tty=/dev/ttyS0 to tty=/dev/ttyXXX,
> >
> > Is it all right?
> > ############################################
> > # Project file for generating modbusdaemon #
> > # mkmodbus name.mkmodbus                   #
> > ############################################
> > shared_memory=/srv/automation/shm/modbus.shm
> > mailbox=/srv/automation/mbx/modbus.mbx
> > communication=serial
> > tty=/dev/ttyS0
> > baudrate=9600
> > rtscts=1
> > parity=0   # 0=NONE 1=ODD 2=EVEN
> > protocol=0 # 0=RTU  1=ASCII
> > #communication=socket
> > tcpadr=lehrig2
> > tcpport=502
> > #eventlog host=localhost port=6000
> > # function := 1=ReadCoilStatus | 2=ReadInputStatus | 3=ReadHoldingRegisters
| 4=ReadInputRegisters
> > #             1 coil per bit   | 1 input per bit   | 2 byte per register   
| 2byte per register
> > cycle1 slave=1 function=1 start_adr=0 num_register=3
> > cycle2 slave=2 function=2 start_adr=0 num_register=3
> > cycle3 slave=3 function=3 start_adr=0 num_register=3
> > cycle4 slave=4 function=4 start_adr=0 num_register=3
> > cycle5 slave=5 function=2 start_adr=0 num_register=3
> > cycle6 slave=6 function=2 start_adr=0 num_register=3
> > cycle7 slave=7 function=2 start_adr=0 num_register=3
> >
> >
> >
> > --- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@> wrote:
> > >
> > >
> > >
> > > > Hi Master,
> > > This title is really not necessary.
> > >
> > > > When i have ready modbusdaemon program, i have found error of
> > > > have not ttyS0 device.
> > > >
> > > > [root@EmbedSky /root]# ./modbusdaemon
> > > > could not open serial device /dev/ttyS0
> > > >
> > > > I guess in my embedded linux system has not ttyS0 device,
> > > > so need i reconfigurate modbusdaemon or write another
> > > > tty kernel module in linux using for modbusdaemon?
> > > The serial devices are probably called
> > > /dev/ttyXXX
> > > You have to figure out, what the according tty is called on your system.
> > > Then you edit the INI file and insert the name there.
> > >
> > > Another reason might be that a normal user is not allowed to open the tty.
> > > Try running modbusdaemon as root.
> > > If this works it will be a good idea to make the user a member
> > > of group "dialout".
> > >
> >
>

#1646 From: "pvbrowser" <pvbrowser@...>
Date: Mon Mar 5, 2012 8:33 am
Subject: Re: Pvbrowser using MODBUS for data aquisition
pvbrowser
Send Email Send Email
 
<a_la_wachinwei@...> wrote already good suggestions

Here is another suggestion from me:

Use the command "stty" to show and set the tty parameters.
For example show the parameters with:
stty -F /dev/ttyXYZ

Use a null modem cable to connect 2 PC, or your embedded device with the PC.
On one side use a terminal emulator like
http://en.wikipedia.org/wiki/Minicom
and on the other side type
ls > /dev/ttyXYZ

#1647 From: "landratte71" <landratte71@...>
Date: Mon Mar 5, 2012 12:59 pm
Subject: Re: Bugreport: problems with xAxis and yAxis on QDrawWidget
landratte71
Send Email Send Email
 
I'm fine with gSetFloatFormat.

Thx
Landratte

--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
> This had been to quick.
> The code is now as follows.
> Within the last post there was a bug.
>
> static int beautyval(char *text)
> {
>   char *cptr = strchr(text,'.');
>   if(cptr != NULL)
>   {
>     char *end = cptr + strlen(cptr) - 1;
>     while(end != cptr) // eliminate trailing 0
>     {
>       if     (*end == '0') { *end = '\0'; }
>       else if(*end == '.') { *end = '\0'; break; }
>       else                 { break; }
>       end--;
>     }
>     if(cptr == end) *cptr = '\0';
>   }
>   return 0;
> }
>

#1648 From: "landratte71" <landratte71@...>
Date: Tue Mar 6, 2012 8:27 am
Subject: Bugreport: Problems with FileOpenDialog on Windows
landratte71
Send Email Send Email
 
I noticed a strange behavior using FileOpenDialog on windows.

I suggest following changes in pvbrowser:

interpreter.cpp

- if (type==0) result = QFileDialog::getOpenFileName();
+ if (type==0) result = QFileDialog::getOpenFileName(NULL, QString::null,
QDir::tempPath());

- else if (type==1) result = QFileDialog::getSaveFileName();
+ else if (type==1) result = QFileDialog::getSaveFileName(NULL, QString::null,
QDir::tempPath());

-else if (type==2) result = QFileDialog::getExistingDirectory();
+else if (type==2) result = QFileDialog::getExistingDirectory(NULL,
QString::null, QDir::tempPath());


MyWidgets.cpp

- name = dlg.getSaveFileName(NULL, QString::null, QString::null, "*.csv");
+ name = dlg.getSaveFileName(NULL, QString::null, QDir::tempPath(), "*.csv");

Now changing the environment variable TMP controls the behavior of the dialog!

ciao
Landratte

#1649 From: "pvbrowser" <pvbrowser@...>
Date: Tue Mar 6, 2012 9:24 am
Subject: Re: Bugreport: Problems with FileOpenDialog on Windows
pvbrowser
Send Email Send Email
 
I have tested on Windows and think it is OK.

Within "pvbrowser->options" you set the temp directory for the pvbrowser client.

Default:
temp=%TEMP%

Customized:
temp=c:\my\temp

%TEMP% is defined on every version of Windows.
On Windows XP it points to
%USERPROFILE%\TEMP
That is, there is a temp directory for each user.

pvbrowser will do a chdir() to this temp directory and
thus the file dialogs will start from there.

%TEMP% and %TMP% might be different !!!

If you customize temp=c:\my\temp you must create the directory first.

What exactly is the problem ?

PS: The file dialogs may be a little bit confusing.
Please note that a directory on the client is opened not on the server.

#1650 From: "pvbrowser" <pvbrowser@...>
Date: Tue Mar 6, 2012 10:04 am
Subject: Re: Bugreport: Problems with FileOpenDialog on Windows
pvbrowser
Send Email Send Email
 
You may be right that it is better to explicitly set our temp
directory while calling FileDialogs.

But we should use our "opt.temp" for that.
QFileDialog::getOpenFileName(NULL, QString::null, opt.temp);
QFileDialog::getSaveFileName(NULL, QString::null, opt.temp);
QFileDialog::getExistingDirectory(NULL, QString::null, opt.temp);

#1651 From: "a_la_wachinwei" <a_la_wachinwei@...>
Date: Thu Mar 8, 2012 2:00 pm
Subject: Re: problems importing masks from qt designer
a_la_wachinwei
Send Email Send Email
 
solved!

--- In pvbrowser@yahoogroups.com, "a_la_wachinwei" <a_la_wachinwei@...> wrote:
>
> ok!
> This was my problem I guess (exporting first from pvdevelop) I'll try it out.
> And good point about the available widgets!
> thanks
>
> Joa
>
> --- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@> wrote:
> >
> >
> >
> > The procedure is as follows:
> >
> > Within pvdevelop
> > Choose the mask number you want to edit in qt designer
> > select menu Action->Export UI-File
> >
> > Open maskN.ui with qt designer
> > insert your widgets
> > and save maskN.ui
> >
> > Within pvdevelop
> > Choose the mask number N
> > select menu Action->Import UI-File
> > The mask will be imported and the pvserver will be compiled.
> >
> > #####################################
> >
> > You must always generate the sourcecode framework for maskN using pvdevelop.
> > After you have done this use the above procedure.
> >
> > #####################################
> >
> > If you directly start the new maskN.ui within qt designer you must
> > take care that you choose a "template/forms Widget"
> >
> > But pvdevelop must be used to generate the skeleton for the slotFunctions
first.
> >
> > It will be better to use pvdevelop to generate the skeleton for the mask
first.
> > Then export the ui file.
> > And then use qt designer.
> >
> > #####################################
> >
> > Attention:
> > Within qt designer you can only use these widgets.
> > http://pvbrowser.de/pvbrowser/index.php?menu=1&topic=1&subtopic=3
> >
> > #####################################
> >
> > PS:
> > pvdevelop can be used interactively with the GUI
> > or as a commandline tool.
> >
> > Here is the usage for pvdevelop as a commandline tool.
> >
> > me@mybox:~/temp/uitest> pvdevelop --help
> > ####################################################
> > # Develop pvserver for pvbrowser                   #
> > ####################################################
> > usage: pvdevelop <-action=<action>> <-programming_language=language> <-h>
project
> > example: pvdevelop pvs
> > example: pvdevelop -action=writeInitialProject pvs
> > -action=writeInitialProject
> > -action=insertMask
> > -action=make
> > -action=makeModbus
> > -action=makeSiemensTCP
> > -action=makePPI
> > -action=uncommentRLLIB
> > -action=uncommentModbus
> > -action=uncommentSiemensTCP
> > -action=uncommentPPI
> > -action=writeStartscript
> > -action=writeDimension:<xmax>:<ymax>
> > -action=importUi:<masknumber>
> > -programming_language=<Lua|Python>
> >
>

#1652 From: "a_la_wachinwei" <a_la_wachinwei@...>
Date: Thu Mar 8, 2012 2:09 pm
Subject: about qtdatabase.cpp/h and QSQLITE driver
a_la_wachinwei
Send Email Send Email
 
Hi all, I propose a variation of this tool, and a tip to all pvbrowser partners
here.

If you use Qt + QSQLITE driver you have to pay attention that Sqlite doesn't
have the feature of returning the size of a "select" query.

So the program we have to aid accessing to databases doesn't work!!

the function qtDatabase::populateTable(PARAM *p, int id) should change this way
(surely it isn't the best way, it's only my way xddd):

int qtDatabase::populateTable(PARAM *p, int id)
{
   int x,y,xmax,ymax;


   if(db == NULL)
   {
     pvStatusMessage(p,255,0,0,"ERROR: qtDatabase::populateTable() db==NULL");
     return -1;
   }

   // set table dimension
   xmax = result->record().count();
   // ymax = result->size();
+  if(db->driverName() == "QSQLITE")
+  {
+ result->last();
+ ymax = result->at()+1;
+ result->first();
+ //printf("SQLITE ymax = %d \n",ymax);
+ }
+  else
+  {
     ymax = result->numRowsAffected();
+ //printf("no SQLITE, ymax = %d \n",ymax);
+  }
   pvSetNumRows(p,id,ymax);
   pvSetNumCols(p,id,xmax);

[...]

I've already to test it better, but so, now my program works. I think we have to
pay attention to the numRowsAffected() too, because it doesn't work with
"select" statements, we should use size() instead.
http://qt-project.org/doc/qt-4.8/qsqlquery.html#numRowsAffected

what do you think?
Monday I'll try to do further test.

#1653 From: "pvbrowser" <pvbrowser@...>
Date: Thu Mar 8, 2012 3:42 pm
Subject: Re: about qtdatabase.cpp/h and QSQLITE driver
pvbrowser
Send Email Send Email
 
> If you use Qt + QSQLITE driver you have to pay attention that
> Sqlite doesn't have the feature of returning the size of a "select" > query.

Could you please test if this would work ?
ymax = result->size();
http://qt-project.org/doc/qt-4.8/qsqlresult.html#size

The qtDatabase template in pvbaddon is only intendet as a starting point for
your own database application.
Database programming in pvbrowser is in principle Qt database programming.
I think this is an issue related either to Qt or sqlite.

#1654 From: "pvbrowser" <pvbrowser@...>
Date: Sat Mar 10, 2012 1:57 pm
Subject: pvbrowser webpage got a new design
pvbrowser
Send Email Send Email
 
http://pvbrowser.org
has got a new design.
The content has also been reworked.
The page is now in English and Deutsch.

#1655 From: "TeeDeeKay" <td_kenyon@...>
Date: Mon Mar 12, 2012 7:01 am
Subject: Re: pvbrowser webpage got a new design
td_kenyon
Send Email Send Email
 
Website looks neat, a lot more modern. An important aspect when considering
SCADA is a graphical software application.

Good work!!


--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
> http://pvbrowser.org
> has got a new design.
> The content has also been reworked.
> The page is now in English and Deutsch.
>

#1656 From: "a_la_wachinwei" <a_la_wachinwei@...>
Date: Mon Mar 12, 2012 7:34 am
Subject: Re: about qtdatabase.cpp/h and QSQLITE driver
a_la_wachinwei
Send Email Send Email
 
totally agree
It's a QT issue, but like that, populatetable() doesn't work with SQLite DB.
ymax = result->size(); returns always -1 because SQLite driver doesn't allow
size commands.

If someone here has tought using a SQLite DB with Pvbrowser should pay attention
this, I think.



--- In pvbrowser@yahoogroups.com, "pvbrowser" <pvbrowser@...> wrote:
>
>
>
> > If you use Qt + QSQLITE driver you have to pay attention that
> > Sqlite doesn't have the feature of returning the size of a "select" > query.
>
> Could you please test if this would work ?
> ymax = result->size();
> http://qt-project.org/doc/qt-4.8/qsqlresult.html#size
>
> The qtDatabase template in pvbaddon is only intendet as a starting point for
your own database application.
> Database programming in pvbrowser is in principle Qt database programming.
> I think this is an issue related either to Qt or sqlite.
>

#1657 From: "pvbrowser" <pvbrowser@...>
Date: Mon Mar 12, 2012 7:53 am
Subject: Re: about qtdatabase.cpp/h and QSQLITE driver
pvbrowser
Send Email Send Email
 
<a_la_wachinwei@...> wrote:
>
> totally agree
> It's a QT issue, but like that, populatetable() doesn't work
> with SQLite DB.

agree with you.
I have inserted a comment in the qtdatabase.cpp template.
It looks as follows (pvbaddon.tar.gz not yet uploaded).

   // set table dimension
   xmax = result->record().count();
   //
   // Using SQLITE user a_la_wachinwei from our forum found an issue
   // getting ymax.
   // With SQLITE numRowsAffected() does not return the correct value.
   // Other database systems do.
   //
   if(db->driverName() == "QSQLITE")
   {
     result->last();
     ymax = result->at()+1;
     result->first();
     //printf("SQLITE ymax = %d \n",ymax);
   }
   else
   {
     ymax = result->numRowsAffected();
     //printf("no SQLITE, ymax = %d \n",ymax);
   }
   pvSetNumRows(p,id,ymax);
   pvSetNumCols(p,id,xmax);

#1658 From: "a_la_wachinwei" <a_la_wachinwei@...>
Date: Mon Mar 12, 2012 8:01 am
Subject: Re: about qtdatabase.cpp/h and QSQLITE driver
a_la_wachinwei
Send Email Send Email
 

>   // Using SQLITE user a_la_wachinwei from our forum found an issue

this, as the title of master is not really necessary, xddd


>     ymax = result->at()+1;

a really good point this!

Joa

#1659 From: "pvbrowser" <pvbrowser@...>
Date: Mon Mar 12, 2012 8:26 am
Subject: Re: about qtdatabase.cpp/h and QSQLITE driver
pvbrowser
Send Email Send Email
 
> this, as the title of master is not really necessary, xddd

OK, here is the anonymous version
   //
   // Using SQLITE a user from our forum found an issue
   // getting ymax.
   // With SQLITE numRowsAffected() does not return the correct value.
   // Other database systems do.
   //

#1660 From: "pvbrowser" <pvbrowser@...>
Date: Mon Mar 12, 2012 8:28 am
Subject: What do you think about security?
pvbrowser
Send Email Send Email
 
Currently pvbrowser supports ssh for connecting to a pvserver
(pvssh://your_server).
In this case the pv protocol is tunneled via ssh and runs on a port that is
forwarded by ssh to the remote computer.
The normal pv protocol is plain text.

What do you think about extending security and encryption by using plugins that
can be written by users?

The functions for sending/receiving data over tcp could be extendet by a dynamic
loadable library.
Something like this.

//######################

if(cipher != NULL)
{
   len = encryt(message);
}
tcp_send(s,message,len);

//######################

len = tcp_rec(s,message,maxlen);
if(cipher != NULL)
{
   len = decrypt(message);
}

//######################

The dynamic loadable library would provide the encrypt()/decrypt() functions.
This library could be written by you and given to external users that want to
connect to your visualization.
It would contain the private keys for encoding and decoding.
You would send the public key when connecting.
The public key could include a fingerprint of the computer that wants to
connect.
For example the mac address of your network adapter or further information about
the hardware of the client computer.
Your pvserver could check the fingerprint and if it is unknown to the pvserver
disconnect the client.
It might also be possible to give the remote user something like a PIN number
(by phone?) for using only 1 time.

We could provide an example plugin that everybody might modify for himself.

What do you think about security and such an approach?
Or do you think that SSH or VPN is enough?

#1661 From: "pvbrowser" <pvbrowser@...>
Date: Mon Mar 12, 2012 8:38 am
Subject: Access control
pvbrowser
Send Email Send Email
 
By the way, we already have "Allow" and "Deny" files.

See:
http://pvbrowser.org/pvbrowser/doc/pvb.en.pdf
Page 117-118 "Starting a pvserver in the background -> Acess control"

Messages 1632 - 1661 of 2237   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help