Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple DNET set output fail on error: wait for state

Hey I am only trying to help here.

If you try to use the configurator from Max all the parameters from your devices EDS file have to be the same as the parameters detected from your device:

 

 VendCode    = 47;        $ Vendor Code
 ProdType    = 07;         $ General Purpose Discrete I/O
 ProdCode    = 823;       $

 MajRev      = 1;            $ Major Revision
 MinRev      = 1;            $ Minor Revision

 

If that is not the case the device can not work in Configurator.

 

Now you could use a VI example as well that would not check the EDS file parameters.

The single device  example should work if you would configure the first two bytes for your Output array. (was my first reply to your post)

Here is an example for how to configure the parameters.

 

example.jpeg

 

Who is allowing a newbie to commission a project over Christmas all by himself? Hope this is not a Joke?

 

Thanks

DirkW

0 Kudos
Message 11 of 20
(8,865 Views)

Hello, 

 

Since your previous screenshots showed that your EDS file was loaded successfully, and now you are receiving an error related to an EDS file missing, we are concerned that there may be an issue with the EDS file itself. The instructions on how to configure a third-party device with DeviceNet can be found here, which includes information on how to set up your EDS file and I/O Data. This tutorial is specific to a IAI PLC, however, the procedure should be similar for your OMROM devices. 

Julianne K
Systems Engineer, Embedded Systems
Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
National Instruments
0 Kudos
Message 12 of 20
(8,864 Views)

hi Dirk,

 

1. when you told me to configure output, i thought i should go to MAX to configure hardware. That's why i go to dnet configurator trying to configure. Your example + julianne example are much clearer than the device net manual itself.

 

2. i've tried to use singledevice.vi as shown in the picture, and i see the output turn on as "configured" in the output data. BUT, it turns on only for certain period of time then it turns off again with a time out error. What's wrong with that? terminating resistors have been placed at both ends. The omron device does show solid green (means no error) and blinking NS green (means comunication is good). Anything that i should look for? i've decrease the package rate even to 1.

0 Kudos
Message 13 of 20
(8,854 Views)

Even your devices EDS file says that it can work with 75 ms Expected packet rate it might not be able to keep up so you could try decreasing the timing to 100 or 200 ms. 1 ms (1KHz) is to fast for this type of device.

Sometimes the EDS file is not up to date or doen't fully match the revision of yoyur device like in your case. If this communication method doesn't work reliably you can try another one from the supported ones like cyclic for example.

 

If you find some time over Christmas I would recommend the DNET Help manuals shipping with the driver. That should give you the information you might need for this project.

 

DirkW

0 Kudos
Message 14 of 20
(8,850 Views)

Dirk,

1. i dont quite understand how to "decrease the rate". The manual : (1) NI device net programmer ref manual.pdf (2) NI-dnet user manual.pdf dont mention the unit of the expected rate (i've just glanced through them, can't find any clue).

 

2. however, i've tried expected rate =1 it shows error as attached in previous email. Now, i tried expected rate=1000, it still shows the same error. So, what is the expected rate as you advise me to put it.

 

3. what is the unit of expected rate? ms?

 

thansk

0 Kudos
Message 15 of 20
(8,845 Views)

1000 is to much. Try 75 or 100 or 200.

If the timeout still doesn't go away, try to reset your Omron device.

If it still tiemes out, try cyclic communication.

 

DNET User Manual page 4-1

 

DirkW

0 Kudos
Message 16 of 20
(8,841 Views)

Here is the table of my experiment. The Poll method fails in all my combinations.

 

Questions

 

  1. This should be my last questions for DNET issues.
  2. In “omron data.png” we can see that cyclic method uses 0 output.
    1. Why is that 0 (when there are 2 byte  outputs)?
    2. Same question for strobe method? What does number 2 refer to in the picture?
  3. When you see my experiments table, can you tell why this module works only with cyclic method?
 

Type

input length

output length

1

strobe

0

1

time out

2

strobe

0

2

param error

3

cyclic

0

2

param error

4

cyclic

1

0

no output

5

cyclic

1

1

param error

6

cyclic

1

2

success

 

 

 omron data.png

Download All
0 Kudos
Message 17 of 20
(8,839 Views)

 

My assumtion of why it works is that for cyclic communication it needs 2 output bytes and 1 input byte initialized in your LV arrays in order to work.

No idea what the input byte is for. Can you trythe same settings for Poll with 100 for expected packed rate?

But as I said the EDS file seems to not fit your device. at least that was my assumtion from the error in Max. Your new screenshot shows that the EDS file now works in configurator?

The manual to the Omron device should tell you why the number of bytes change for the communication methods.

 

DirkW

 

0 Kudos
Message 18 of 20
(8,835 Views)

hi Dirk,

Thanks a lot for your prompt help today.

I've tried the poll method yesterday for 1,100,200,400,1000 ms (expected rate).

They all result in time out error.

 

thanks

0 Kudos
Message 19 of 20
(8,833 Views)

I am not an expert on DeviceNet communication, but in case of NI SingleDevice.vi it is possible that it is trying to read data before connection is established.
That may result in timeout error. I have modified the SingleDevice.vi to SingleDevice Mod.vi, please try it to see if that clears the issue.
I don’t have a DeviceNet system here to test this modification, so it is totally UNTESTED.

Good Luck.

 

SMP

0 Kudos
Message 20 of 20
(8,810 Views)