Code Monkey home page Code Monkey logo

Comments (5)

pjkundert avatar pjkundert commented on July 20, 2024

Yes, you can specify one of the CIP data types (SINT), (INT), (DINT) or (REAL) -- and now also (BOOL) for the data on the command line. It applies to all data being written to that tag. You can write different data types in a separate Tag request, eg:

python -m cpppo.server.enip.client -a 127.0.0.2 'MYTAG=(INT)32767' 'MYTAG=(DINT)50000' 'MYARRAY[5-6]=(REAL)1.23,4.56'

This is documented in the README.org or README.pdf chapter on the "EtherNet/IP Controller Client".

from cpppo.

gsingh-cp avatar gsingh-cp commented on July 20, 2024

Thanks for your reply.

In your above example, should I not have indexes for MYTAG?

python -m cpppo.server.enip.client -a 127.0.0.2 'MYTAG[0]=(INT)32767' 'MYTAG[1]=(DINT)50000' 'MYARRAY[5-6]=(REAL)1.23,4.56'

Also I looked at the documentation for setting for the corresponding server for a message like this, but was unsuccessful.

What would be the correct server syntax for this?

python -m cpppo.server.enip -a 127.0.0.2 --print MYTAG=DINT[1] ...?

Thanks again for your assistance.

from cpppo.

pjkundert avatar pjkundert commented on July 20, 2024

Yes, if your MYTAG is an array, then you need to include indices.

If you look here:

https://github.com/pjkundert/cpppo#ethernetip-cip-controller-communications-simulatorclient

there is a description of how to start a simulator with Tags of various data types; you're on the right track.

from cpppo.

gsingh-cp avatar gsingh-cp commented on July 20, 2024

Hi

I am able to start the server to look for different tags with various data types, but not 1 tag with various data types.

Server/Listener (not correct):
python -m cpppo.server.enip -a 127.0.0.2 --print 'MYTAG[0]=INT[1]' 'MYTAG[1]=DINT[1]'

Client:
python -m cpppo.server.enip.client -a 127.0.0.2 'MYTAG[0]=(INT)32767' 'MYTAG[1]=(DINT)500000'

I had a read through the document, seems I am missing something.

Thanks

from cpppo.

datasim avatar datasim commented on July 20, 2024

No, you must make separate tags; each tag must be if one single type.

On Friday, September 18, 2015, gsingh-cp [email protected] wrote:

Hi

I am able to start the server to look for different tags with various data
types, but not 1 tag with various data types.

Server/Listener (not correct):
python -m cpppo.server.enip -a 127.0.0.2 --print 'MYTAG[0]=INT[1]'
'MYTAG[1]=DINT[1]'

Client:
python -m cpppo.server.enip.client -a 127.0.0.2 'MYTAG[0]=(INT)32767'
'MYTAG[1]=(DINT)500000'

I had a read through the document, seems I am missing something.

Thanks


Reply to this email directly or view it on GitHub
#7 (comment).

-pjk

from cpppo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.