patchGNU Octave - Patches: patch #8263, Instrument control package: add...

 
 

patch #8263: Instrument control package: add modbus capabilities

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Wed 18 Dec 2013 06:33:11 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 12 Jan 2014 10:52:28 AM UTC, comment #2:

Hi Stephan,

Modbus is intrinsically low-level. You can think of it as four tables :
- two register (16 bits) tables, one (input_registers) is read only
- two bits/coils tables, one (input_bits) is read only

There are thus four kinds of read operations and two kinds of write operations.

To access data you have to specify the address of the concerned bit/register. This prevents to mimic directly the interface of set/get or fread/fwrite as you propose.

I can think of something like:

Practically, you often want to retrieve/write floats, which are made of two (not necessarily consecutive) registers. This part is done using bitget/bitpack functions in octave. For this part of the job I can think of a something like:

Pantxo

Pantxo Diribarne <pantxo>
Project Member
Sat 11 Jan 2014 07:35:21 PM UTC, comment #1:

Just looked to the code. It's a very low level interface to libmodbus. I would prefer a more high level interface, similar to the existing interfaces with own data type.

For example:

I've never worked with modbus yet, so what's your opinion? Does it make sense?

Stefan Mahr <dac922>
Wed 18 Dec 2013 06:33:11 PM UTC, original submission:

Attached is an embryonic support for modbus protocol that could be added to the instrument control package. A few details:
- Depends on libmodbus
- only a subset of the client functions is implemented
- included tests are roughly translations (from c to m file) of the tests in libmodbus source. They rely on a an external modbus servers which compiled from a copy of test servers in libmodbus source.

To test one must install libmodbus, cd into the attached directory, "make" and "make check"

Pantxo Diribarne <pantxo>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #30039:  octave-modbus.tar.gz added by pantxo (20kB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dac922 (Posted a comment)
  • -unavailable- added by dac922
  • -unavailable- added by pantxo (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Dec 2013 12:23:25 AM UTCdac922Carbon-Copy-=>Added dac922
    Wed 18 Dec 2013 06:33:11 PM UTCpantxoAttached File-=>Added octave-modbus.tar.gz, #30039

    Back to the top


    Powered by Savane 3.1-cleanup