Welcome, Guest
Username: Password: Remember me

TOPIC: Re:Proview as HMI to Siemens S7?

Re:Proview as HMI to Siemens S7? 9 years 8 months ago #6712

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
If you look in the Status attribute of the Nodave_PLC object you might get some more information. Either "No such device" or an error message from nodave.

/Claes
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 9 years 8 months ago #6738

  • multiplex
  • multiplex's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Ok i initially reported my error wrong, i thought it was ERRINDEVICE but it was actually due to the fact nodave wasn't compiled into the standard ubuntu package. I'd have to look back to find the exact error code now..

So instead built from source, and that got me a little farther.

I now have a status in Nodave_PLC but it reads 'No such device'

I dug around a bit in the code, and it seems to report this after failing to setport (/dev/ttyUSB1, 9600, E)

its nearly the same function that is called in the testAS511 program except test looks for it to pass and rt_io_m_nodave_plc.c looks for it to fail and then serves the error messages

Since i'm able to run ./testAS511 /dev/ttyUSB1 as user pwrp and connect properly i'm not sure what the issue would be with proview itself.

i even recompiled and hard coded my device into rt_io_m_nodave_plc.c thinking it was some formatting problem, but that gave the same error.

Any ideas where to go next? Thanks
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 9 years 8 months ago #6742

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
If you are running on a development station you can set owner to root and the s-bit on the plc executable.

> chown root $pwrp_exe/plc_...
> chmod u+s $pwrp_exe/plc_...

This is normally done on a process station to make it possible to do some initializations that requires root access.

You can also start the plc with debug and step through the nodave initialization to see exactly which system call is causing the problem.

/Claes
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 9 years 8 months ago #6744

  • multiplex
  • multiplex's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
thanks for the tips.. using debug and gdb i was able to see all of the function calls. Pointed out one large mistake i made along the way. I had renamed my Plc but didn't update the name in the build optoins :evil:

from there i was still getting an error when daveConnectPLC() was called. I compared code between rt_io_m_nodave_plc.c and the libnodave test program testAS511.c

Although the libnodave documentation says this isn't needed, I noticed that fds.wfd wasn't being set.

so i added in the second line below

local->fds.rfd = setPort( op->SerialDevice, serial_speed, serial_parity);
local->fds.wfd = local->fds.rfd;

magically, my connection now worked! (its also important to chown / chmod the plc file)

my nodave_plc is running and nodave_tran is initiated

Now i'm getting an error when i try to use chanli, but i haven't looked into it too far yet. I'll check into that shortly

Started pwr_plc_proc_999_0, prio: 5, pid: 1697
file: plc_ubuntu_0999_proc
connect::
0:0x00,0xF0,0x00,0xF0,0x00,0xEF,0x00,0xEF,0x80,0xEE,0x00,0xEC,0x00,0xED,0x00,0xEA,
10:0x00,0x8B,0x04,0xCF,0xFF,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
20:0x00,0x00,0x00,0x00,0x00,0x0A,0x00,0xEF,0x04,0x00,0x0A,0x00,0x03,0x10,0x03,
start of inputs in memory ef00
start of outputs in memory ef80
start of flags in memory ee00
start of timers in memory ec00
start of counters in memory ed00
start of system data in memory ea00
IF1 daveEndTrans *** no accept of eot/ETX from plc.
IF1 *** Error in Exchange.EndTrans request.
IF1 *** Error in ReadS5Bytes.Exchange sequence.
IF1 *** Error in Exchange.ReqTrans request.
IF1 *** Error in BlockAddr.Exchange sequense.
IF1 *** Error in ReadS5Bytes.BlockAddr request.
IF1 *** Error in Exchange.ReqTrans request.
IF1 *** Error in BlockAddr.Exchange sequense.
IF1 *** Error in ReadS5Bytes.BlockAddr request.
The administrator has disabled public write access.
Time to create page: 8.106 seconds