Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Adjust Zero on Dnet MFC

So far, so good.  I have gotten fairly handy at running Dnet MFCs.  I open an explicit

message and open an IO then I can set and get parameters and the setpoint.  I can close my application and restart it w/o having to reset the NI-CAN board.  I have just one

more stumbling block...

 

I want to zero the MFC using the Analog sensor object(x31).  The documentation says this is

done by sending a service 0x4B to instance 1.  I tried doing this using the Write Explicit

Message.vi and I get:

 

Error -1074388978 occurred at Get DeviceNet Attribute.vi

Possible reason(s):

NI-CAN:  (Hex 0xBFF6200E) You called Read DeviceNet Explicit Message before the response

arrived. Solution: Wait for the Read Avail state prior to calling read; Make sure you call

Write DeviceNet Explicit Message before calling read (every response requires a request).

 

For sure I am missing something.  I have wired the explicit message handle into Write

Explicit Message.vi.  What am I missing?

 

Thanks,

 

Joe

0 Kudos
Message 1 of 4
(6,866 Views)

Hey Joe,

 

First off does your literature state that after sending the the 0x4B service to instance 1, Instance 1 is supposed to return somethingback?  If it isn't supposed to then you are trying to read and nothing is thereto be read. 

 

If we know the after writing to the device we do expect a return message then I would go ahead and try to implement a Wait For State functionality prior to reading (get attribute).  PLease look at the following shipping example (ExplMsgWriteRead.vi)  and notice how they implement aWait for State.vi (you can find the shipping example Here: ...Program Files\National Instruments\LabVIEW 8.6\examples\nidnet\DeviceNet - Basic.ll)

 

Let us know if this helps!

Charley Dahan

Global Account Manager
0 Kudos
Message 2 of 4
(6,851 Views)

Charles,

 

Thanks.  This is exactly what I ended up doing.  I found that just adding the wait.vi did not do it.  I still had to perform a read after the wait.  Once I did that all was well.  I can now zero the MFC.

 

Cheers,

 

Joe

0 Kudos
Message 3 of 4
(6,849 Views)

Glad I could Help!

 

 

Charley Dahan

Global Account Manager
0 Kudos
Message 4 of 4
(6,833 Views)