LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with negative numbers. FPGA and compiled host to .exe (LV7.1 + PCI7833R)

HI,
 
I'm working with an R serie PCI-7833R  inboard FPGA and LV7.1.
I'm usign a simple PID loop with analog I/O.
All I/O and variables are int16.
 
When I run the host.vi, I can set a negative setpoint down to - 32768 and all goes well.
But when I compile the host.vi to host.exe, the setpoint into the FPGA can't go lower than 0.
At the same time, I can read negative analog input (int) and negative int16 feedback into the PID !!!
 
Thanks for your reply.
 
Allo,
 
J'utilise une carte PCI-7833R (FPGA) et LV7.1
J'ai un PID implémenté dans le FPGA avec une consigne d'entrée en variable, 1 rétroaction en entrée analogique et une sortie analogique pour la commande. 
Rien de plus simple....
 
Lorsque j'utilise un host.vi tout fonctionne bien.
Mais lorsque ce host.vi est compilé en host.exe, la consigne passée par variable au fpga est saturée entre 0 et 32768. Les consignes négatives sont donc inutilisables.
Pourtant toutes les variables sont int16 !!!
 
Merci à l'avance de votre réponse.
 
--
NICOLAS HUPPÉ,M.Sc.A, ing. jr.
Groupe de Recherche PERSEUS
Université de Sherbrooke
 
 
 
 
 
 
 
 
  
 
 
 
 
 
0 Kudos
Message 1 of 4
(4,729 Views)
Hi Nick,

Are you using one of our example VIs. If so, what is the name of the example VI that you're using? If you're not using one of our example VIs, can you attach a simple example VI that illustrates the issue?

Regards,
Stanley Hu
National Instruments
Applications Engineering
http://www.ni.com/support
0 Kudos
Message 2 of 4
(4,471 Views)
Hi again,
I tried with the FPGA_PID_LPFIR.vi and it works fine.
There's no problem with negative setpoint.
 
 
Attached file :
 
This is a bit more complicated code since there's quadrature counter and SELECT in the pid loop.
 
**I must point out the fact that there's a SELECT  between an int16 analog feedback and an u32 quadrature counter.
   I don't know if it can interfer with the int16 setpoint labeled in french "CONSIGNE_ENTREE"
  
   I can't do futher testing at this time because the FPGA is actually in production mode.
 
   But I'm setting up an other computer with the same model of FGPA (PCI-7833R) in order to investigate this problem.
 
----
NICOLAS HUPPÉ,M.Sc.A, ing. jr.
Groupe de Recherche PERSEUS
Université de Sherbrooke
 
0 Kudos
Message 3 of 4
(4,014 Views)
Hi Nick,


@Nick Huppe wrote:
Hi again,
I tried with the FPGA_PID_LPFIR.vi and it works fine.
There's no problem with negative setpoint.
 


Does this mean that you're able to get it working?

Regards,
Stanley Hu
National Instruments
Applications Engineering
http://www.ni.com/support
0 Kudos
Message 4 of 4
(3,666 Views)